From 75287e5bc874cbea57afe0830d61fc181f844e0c Mon Sep 17 00:00:00 2001 From: Gregory Heskett Date: Wed, 21 Jan 2026 06:38:11 -0600 Subject: [PATCH] Rename all TODOs to DECOMP_DO and HACKERSM64_DO The TODO keyword should really be reserved for actual ROM hackers, as most of them probably couldn't care less about any HackerSM64 or decomp tech debt. Searchability for the TODO keyword, as well as HACKERSM64_DO and DECOMP_DO should also be a lot easier now, with fewer irrelevant results. --- Makefile | 4 +- Makefile.split | 2 +- actors/bowser_flame/model.inc.c | 2 +- actors/door/model.inc.c | 2 +- actors/impact_smoke/model.inc.c | 2 +- data/behavior_data.c | 4 +- extract_assets.py | 8 +-- include/config/config_game.h | 2 +- include/course_table.h | 2 +- include/object_constants.h | 4 +- include/segment_names.h | 6 +-- levels/castle_grounds/areas/1/11/model.inc.c | 4 +- levels/castle_grounds/areas/1/12/model.inc.c | 2 +- levels/castle_inside/painting.inc.c | 4 +- levels/jrb/unused_lid/collision.inc.c | 2 +- levels/level_defines.h | 2 +- levels/wf/leveldata.c | 2 +- src/audio/data.h | 1 - src/audio/external.c | 51 +------------------ src/audio/heap.c | 22 ++++---- src/audio/heap.h | 2 +- src/audio/internal.h | 2 +- src/audio/load.c | 4 +- src/audio/port_sh.c | 4 +- src/audio/synthesis.c | 24 ++++----- src/audio/synthesis.h | 4 +- src/audio/synthesis_sh.c | 14 ++--- src/engine/behavior_script.c | 2 +- src/engine/geo_layout.c | 2 +- src/engine/level_script.c | 2 +- src/engine/math_util.c | 2 +- src/engine/surface_collision.c | 2 +- src/game/behaviors/activated_bf_plat.inc.c | 2 +- src/game/behaviors/camera_lakitu.inc.c | 4 +- src/game/behaviors/chain_chomp.inc.c | 2 +- src/game/behaviors/enemy_lakitu.inc.c | 4 +- .../behaviors/falling_rising_platform.inc.c | 2 +- src/game/behaviors/ground_particles.inc.c | 2 +- src/game/behaviors/piranha_bubbles.inc.c | 2 +- src/game/behaviors/platform_on_track.inc.c | 2 +- src/game/behaviors/pyramid_top.inc.c | 2 +- src/game/behaviors/triplet_butterfly.inc.c | 2 +- src/game/behaviors/ukiki.inc.c | 2 +- src/game/behaviors/water_bomb.inc.c | 2 +- src/game/behaviors/water_mist.inc.c | 2 +- src/game/behaviors/water_mist_particle.inc.c | 2 +- src/game/behaviors/water_objs.inc.c | 2 +- src/game/behaviors/water_wave.inc.c | 2 +- src/game/behaviors/wiggler.inc.c | 4 +- src/game/camera.c | 6 +-- src/game/camera.h | 2 +- src/game/debug.c | 6 +-- src/game/emutest.h | 4 +- src/game/ingame_menu.c | 4 +- src/game/level_update.c | 2 +- src/game/mario_actions_cutscene.c | 4 +- src/game/mario_actions_stationary.c | 2 +- src/game/mario_misc.c | 2 +- src/game/mario_step.c | 4 +- src/game/obj_behaviors_2.c | 18 +++---- src/game/object_helpers.c | 4 +- src/game/save_file.h | 2 +- src/game/shadow.c | 2 +- src/goddard/debug_utils.c | 2 +- src/goddard/draw_objects.h | 2 +- src/goddard/dynlist_proc.c | 6 +-- src/goddard/dynlists/dynlist_macros.h | 2 +- src/goddard/gd_types.h | 2 +- src/goddard/renderer.c | 4 +- src/goddard/shape_helper.c | 2 +- src/goddard/skin.c | 2 +- src/goddard/skin_movement.c | 4 +- src/menu/intro_geo.c | 4 +- src/s2d_engine/s2d_buffer.c | 2 +- src/s2d_engine/s2d_parse.c | 2 +- src/s2d_engine/s2d_print.h | 2 +- tools/FlipsSrc/Flips.cpp | 8 +-- tools/FlipsSrc/Flips.h | 6 +-- tools/armips.cpp | 36 ++++++------- tools/lz4tpack.c | 2 +- tools/n64graphics.c | 2 +- tools/stb/stb_image.h | 18 +++---- tools/textconv.c | 4 +- 83 files changed, 178 insertions(+), 228 deletions(-) diff --git a/Makefile b/Makefile index e055d4d5b6..6b6c1c2d7d 100644 --- a/Makefile +++ b/Makefile @@ -138,7 +138,7 @@ endif DEFAULT_OPT_FLAGS = -Os -ffinite-math-only -fno-signed-zeros -fno-math-errno # Note: -fno-associative-math is used here to suppress warnings, ideally we would enable this as an optimization but # this conflicts with -ftrapping-math apparently. -# TODO: Figure out how to allow -fassociative-math to be enabled +# HACKERSM64_DO: Figure out how to allow -fassociative-math to be enabled SAFETY_OPT_FLAGS = -ftrapping-math -fno-associative-math # Main opt flags @@ -724,7 +724,7 @@ $(BUILD_DIR)/%.ci4.inc.c: %.ci4.png #==============================================================================# # Link segment file to resolve external labels -# TODO: ideally this would be `-Trodata-segment=0x07000000` but that doesn't set the address +# DECOMP_DO: ideally this would be `-Trodata-segment=0x07000000` but that doesn't set the address $(BUILD_DIR)/%.elf: $(BUILD_DIR)/%.o $(call print,Linking ELF file:,$<,$@) $(V)$(LD) -e 0 -Ttext=$(SEGMENT_ADDRESS) -Map $@.map -o $@ $< diff --git a/Makefile.split b/Makefile.split index 8be88378b0..19621f5867 100644 --- a/Makefile.split +++ b/Makefile.split @@ -152,7 +152,7 @@ $(BUILD_DIR)/actors/common1.elf: SEGMENT_ADDRESS := 0x03000000 $(BUILD_DIR)/levels/%/leveldata.elf: SEGMENT_ADDRESS := 0x07000000 -# TODO: Generate these rules from the level configs? +# DECOMP_DO: Generate these rules from the level configs? define level_rules = $(1)_SEG7_FILES := $$(patsubst %.png,%.inc.c,$$(wildcard levels/$(1)/*.png)) diff --git a/actors/bowser_flame/model.inc.c b/actors/bowser_flame/model.inc.c index 15c50d0a24..be1f38299e 100644 --- a/actors/bowser_flame/model.inc.c +++ b/actors/bowser_flame/model.inc.c @@ -1,6 +1,6 @@ // Bowser Flame -// TODO: These 64x64 textures are referenced as two different texture addresses in the DLs +// DECOMP_DO: These 64x64 textures are referenced as two different texture addresses in the DLs // 0x06000000 ALIGNED8 static const Texture flame_seg6_texture_06000000[] = { diff --git a/actors/door/model.inc.c b/actors/door/model.inc.c index d6910a0628..f76971b0e9 100644 --- a/actors/door/model.inc.c +++ b/actors/door/model.inc.c @@ -604,7 +604,7 @@ static const Vtx door_seg3_vertex_themed_handle_near_2[] = { }; // 0x03014888 - 0x030149C0 -const Gfx door_seg3_sub_dl_themed_handle_near[] = { // TODO: Combine vertices +const Gfx door_seg3_sub_dl_themed_handle_near[] = { // HACKERSM64_DO: Combine vertices gsSPVertex(door_seg3_vertex_themed_handle_near_1, 15, 0), gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0), gsSP2Triangles( 3, 6, 4, 0x0, 7, 6, 3, 0x0), diff --git a/actors/impact_smoke/model.inc.c b/actors/impact_smoke/model.inc.c index 2c4b4ff97e..83272d20a4 100644 --- a/actors/impact_smoke/model.inc.c +++ b/actors/impact_smoke/model.inc.c @@ -1,6 +1,6 @@ // Impact Smoke -// TODO: These 64x64 textures are referenced as two different texture addresses in the DLs +// DECOMP_DO: These 64x64 textures are referenced as two different texture addresses in the DLs // 0x0605AA28 ALIGNED8 static const Texture impact_smoke_seg6_texture_0605AA28[] = { diff --git a/data/behavior_data.c b/data/behavior_data.c index e125af26b1..097129c05e 100644 --- a/data/behavior_data.c +++ b/data/behavior_data.c @@ -214,7 +214,7 @@ enum BehaviorCommands { #define BIT_CLEAR(field, value) \ BC_BBH(BHV_CMD_BIT_CLEAR, field, value) -// TODO: this one needs a better name / labelling +// DECOMP_DO: this one needs a better name / labelling // Gets a random short, right shifts it the specified amount and adds min to it, then sets the specified field to that value. #define SET_INT_RAND_RSHIFT(field, min, rshift) \ BC_BBH(BHV_CMD_SET_INT_RAND_RSHIFT, field, min), \ @@ -235,7 +235,7 @@ enum BehaviorCommands { BC_BBH(BHV_CMD_ADD_RANDOM_FLOAT, field, min), \ BC_H(range) -// TODO: better name (unused anyway) +// DECOMP_DO: better name (unused anyway) // Gets a random short, right shifts it the specified amount and adds min to it, then adds the value to the specified field. Unused. #define ADD_INT_RAND_RSHIFT(field, min, rshift) \ BC_BBH(BHV_CMD_ADD_INT_RAND_RSHIFT, field, min), \ diff --git a/extract_assets.py b/extract_assets.py index 9e9129893c..4bdd5d0b99 100755 --- a/extract_assets.py +++ b/extract_assets.py @@ -164,7 +164,7 @@ def main(): local_version = new_version # Create work list - todo = defaultdict(lambda: []) + to_do = defaultdict(lambda: []) for (asset, data, exists) in all_assets: # Leave existing assets alone if they have a compatible version. if exists and not (local_version == new_version or asset_needs_update(asset, local_version)): @@ -176,7 +176,7 @@ def main(): mio0 = None if len(pos) == 1 else pos[0] pos = pos[-1] if lang in langs: - todo[(lang, mio0)].append((asset, pos, size, meta)) + to_do[(lang, mio0)].append((asset, pos, size, meta)) break # Load ROMs @@ -206,12 +206,12 @@ def main(): # Go through the assets in roughly alphabetical order (but assets in the same # mio0 file still go together). - keys = sorted(list(todo.keys()), key=lambda k: todo[k][0][0]) + keys = sorted(list(to_do.keys()), key=lambda k: to_do[k][0][0]) # Import new assets for key in keys: - assets = todo[key] + assets = to_do[key] lang, mio0 = key romname = romLUT[lang] if mio0 == "@sound": diff --git a/include/config/config_game.h b/include/config/config_game.h index ede580bffa..b596588ba0 100644 --- a/include/config/config_game.h +++ b/include/config/config_game.h @@ -6,7 +6,7 @@ /** * Enables some mechanics that change behavior depending on hardcoded level numbers. - * TODO: separate this into separate defines, behavior params, or make these mechanics otherwise dynamic. + * HACKERSM64_DO: separate this into separate defines, behavior params, or make these mechanics otherwise dynamic. */ // #define ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS diff --git a/include/course_table.h b/include/course_table.h index c8963274d4..5d2838aa4b 100644 --- a/include/course_table.h +++ b/include/course_table.h @@ -15,7 +15,7 @@ enum CourseNum { #include "levels/course_defines.h" COURSE_END, // To mark end + 1 for marking max and count. - // TODO: clean this up. This is still bad. Which + // DECOMP_DO: clean this up. This is still bad. Which // one is clearer? Need to get rid of one of these. COURSE_MAX = COURSE_END - 1, COURSE_COUNT = COURSE_MAX, diff --git a/include/object_constants.h b/include/object_constants.h index 6f1767cabe..c8f5335871 100644 --- a/include/object_constants.h +++ b/include/object_constants.h @@ -1397,7 +1397,7 @@ enum oActionsIntroPeach { PEACH_ACT_UNFADE, PEACH_ACT_FADE_2, }; -enum animIDsPeach { //! TODO: anim names 0-3 & 6-8 +enum animIDsPeach { //! HACKERSM64_DO: anim names 0-3 & 6-8 PEACH_ANIM_0, PEACH_ANIM_1, PEACH_ANIM_2, @@ -2087,7 +2087,7 @@ enum oActionsSnowmansBottom { #define TTC_COG_BP_SHAPE_HEXAGON (0 << 1) #define TTC_COG_BP_SHAPE_TRIANGLE (1 << 1) #define TTC_COG_BP_DIR_MASK 0x01 - #define TTC_COG_BP_DIR_CCW (0 << 0) // TODO: Check these + #define TTC_COG_BP_DIR_CCW (0 << 0) // DECOMP_DO: Check these #define TTC_COG_BP_DIR_CW (1 << 0) /* TTC Pit Block */ diff --git a/include/segment_names.h b/include/segment_names.h index 3e84d524ba..76360216cb 100644 --- a/include/segment_names.h +++ b/include/segment_names.h @@ -8,9 +8,9 @@ * If you change these numbers, make sure to also change them in Makefile.split, * and in your level scripts (in places marked with *seg*). * - * TODO: Make this an enum without breaking sm64.ld - * TODO: Find a way to use these with SEG_ADDRESS in sm64.ld without breaking Fast64 - * TODO: Find a way to use these with SEG_ADDRESS in Makefile.split + * HACKERSM64_DO: Make this an enum without breaking sm64.ld + * HACKERSM64_DO: Find a way to use these with SEG_ADDRESS in sm64.ld without breaking Fast64 + * HACKERSM64_DO: Find a way to use these with SEG_ADDRESS in Makefile.split */ #define SEGMENT_MAIN 0x00 // | Segment 0 | General Segment, includes most of /src/ (engine, buffers, goddard, audio, etc.) diff --git a/levels/castle_grounds/areas/1/11/model.inc.c b/levels/castle_grounds/areas/1/11/model.inc.c index c441943fcd..5eff63e87e 100644 --- a/levels/castle_grounds/areas/1/11/model.inc.c +++ b/levels/castle_grounds/areas/1/11/model.inc.c @@ -1,11 +1,11 @@ -// TODO: what is this? 0700C4C0-0700C4C8 [8,8] +// DECOMP_DO: what is this? 0700C4C0-0700C4C8 [8,8] UNUSED static const u64 castle_grounds_unused_0 = 0; // 0x0700C4C8 - 0x0700C4E0 // 0x0700C4E0 - 0x0700C4F8 -// TODO: what is this? 0700C4F8-0700C500 [8,8] +// DECOMP_DO: what is this? 0700C4F8-0700C500 [8,8] UNUSED static const u64 castle_grounds_unused_1 = 0; // 0x0700C500 - 0x0700C530 diff --git a/levels/castle_grounds/areas/1/12/model.inc.c b/levels/castle_grounds/areas/1/12/model.inc.c index 55129ae4c5..2d7020bc13 100644 --- a/levels/castle_grounds/areas/1/12/model.inc.c +++ b/levels/castle_grounds/areas/1/12/model.inc.c @@ -1,4 +1,4 @@ -// TODO: what is this? 0700C960-0700C968 [8,8] +// DECOMP_DO: what is this? 0700C960-0700C968 [8,8] UNUSED static const u64 castle_grounds_unused_2 = 0; // 0x0700C968 - 0x0700C9A8 diff --git a/levels/castle_inside/painting.inc.c b/levels/castle_inside/painting.inc.c index a428f2a9b5..dffedbd668 100644 --- a/levels/castle_inside/painting.inc.c +++ b/levels/castle_inside/painting.inc.c @@ -580,7 +580,7 @@ static const Vtx inside_castle_seg7_vertex_07022598[] = { {{{ 0, 614, 0}, 0, { 0, 0}, {0x00, 0x00, 0x7f, 0xff}}}, }; -// TODO: this is unused +// DECOMP_DO: this is unused // 0x070225D8 - 0x07022610 const Gfx inside_castle_seg7_dl_070225D8[] = { gsDPPipeSync(), @@ -592,7 +592,7 @@ const Gfx inside_castle_seg7_dl_070225D8[] = { gsSPEndDisplayList(), }; -// TODO: this is unused +// DECOMP_DO: this is unused // 0x07022610 - 0x07022640 const Gfx inside_castle_seg7_dl_07022610[] = { gsSP1Triangle( 0, 1, 2, 0x0), diff --git a/levels/jrb/unused_lid/collision.inc.c b/levels/jrb/unused_lid/collision.inc.c index 7b60b801d5..4470f75f81 100644 --- a/levels/jrb/unused_lid/collision.inc.c +++ b/levels/jrb/unused_lid/collision.inc.c @@ -1,7 +1,7 @@ // This file only has a collision entry and no model. It may have been some sort of // collision hitbox for an object that didn't have a model. -// TODO: this appears to be a lid for an unused box +// DECOMP_DO: this appears to be a lid for an unused box // 0x0700D1DC - 0x0700D20C const Collision jrb_seg7_collision_0700D1DC[] = { COL_INIT(), diff --git a/levels/level_defines.h b/levels/level_defines.h index 658145795e..334fcdfb00 100644 --- a/levels/level_defines.h +++ b/levels/level_defines.h @@ -10,7 +10,7 @@ // Argument 11: Specify level camera table, if specified. _ for none. // NOTE: Be sure to edit sZoomOutAreaMasks in camera.c, as there isnt a good way to macro those right now. -// TODO: Figure something out for sZoomOutAreaMasks? +// DECOMP_DO: Figure something out for sZoomOutAreaMasks? STUB_LEVEL( "", LEVEL_UNKNOWN_1, COURSE_NONE, 20000, 0x00, 0x00, 0x00, _, _) STUB_LEVEL( "", LEVEL_UNKNOWN_2, COURSE_NONE, 20000, 0x00, 0x00, 0x00, _, _) diff --git a/levels/wf/leveldata.c b/levels/wf/leveldata.c index 071a395a39..ea04b5df3c 100644 --- a/levels/wf/leveldata.c +++ b/levels/wf/leveldata.c @@ -61,7 +61,7 @@ #include "levels/wf/breakable_wall_left/collision.inc.c" #include "levels/wf/kickable_board/collision.inc.c" #include "levels/wf/tower_door/collision.inc.c" -#include "levels/wf/rotating_platform/collision.inc.c" // This is odd... TODO: investigate this. +#include "levels/wf/rotating_platform/collision.inc.c" // This is odd... DECOMP_DO: investigate this. #include "levels/wf/areas/1/10/collision.inc.c" #include "levels/wf/areas/1/11/collision.inc.c" #include "levels/wf/areas/1/collision.inc.c" diff --git a/src/audio/data.h b/src/audio/data.h index b4706868d4..fe875a7283 100644 --- a/src/audio/data.h +++ b/src/audio/data.h @@ -204,7 +204,6 @@ extern OSMesgQueue *D_SH_80350FA8; #define AUDIO_INIT_POOL_SIZE (0x2400 + (MAX_NUM_SOUNDBANKS * sizeof(s32)) + EXT_AUDIO_INIT_POOL_SIZE) #endif -// TODO: needs validation once EU can compile. EU is very likely incorrect! #define AUDIO_HEAP_SIZE (SEQ_BANK_MEM + AUDIO_INIT_POOL_SIZE + NOTES_BUFFER_SIZE + BETTER_REVERB_SIZE + REVERB_WINDOW_HEAP_SIZE) #ifdef VERSION_SH diff --git a/src/audio/external.c b/src/audio/external.c index af117f47d1..e0aae44e0e 100644 --- a/src/audio/external.c +++ b/src/audio/external.c @@ -138,7 +138,7 @@ u8 sSoundRequestCount = 0; // (e.g. "only if Mario's X position is between 100 and 300"), and finally a // fallback dynamic. Due to the encoding of the tables, the conditions must // come in the same order as the macros. -// TODO: dynamic isn't a great term for this, it means other things in music... +// DECOMP_DO: dynamic isn't a great term for this, it means other things in music... enum MusicDynConditionTypes { MARIO_X_GE, @@ -262,55 +262,6 @@ u16 sLevelAcousticReaches[LEVEL_COUNT] = { #define VOLUME_RANGE_UNK2 0.8f #endif -// sBackgroundMusicDefaultVolume represents the default volume for background music sequences using the level player (deprecated). -// This code block is simply commented out for now as to not destroy compatibility with any streamed audio tools. -// TODO: Delete this entirely once the unsupporting streamed tools or their builds are outdated. - -/* - -u8 sBackgroundMusicDefaultVolume[] = { - 127, // SEQ_SOUND_PLAYER - 80, // SEQ_EVENT_CUTSCENE_COLLECT_STAR - 80, // SEQ_MENU_TITLE_SCREEN - 75, // SEQ_LEVEL_GRASS - 70, // SEQ_LEVEL_INSIDE_CASTLE - 75, // SEQ_LEVEL_WATER - 75, // SEQ_LEVEL_HOT - 75, // SEQ_LEVEL_BOSS_KOOPA - 70, // SEQ_LEVEL_SNOW - 65, // SEQ_LEVEL_SLIDE - 80, // SEQ_LEVEL_SPOOKY - 65, // SEQ_EVENT_PIRANHA_PLANT - 85, // SEQ_LEVEL_UNDERGROUND - 75, // SEQ_MENU_STAR_SELECT - 65, // SEQ_EVENT_POWERUP - 70, // SEQ_EVENT_METAL_CAP - 65, // SEQ_EVENT_KOOPA_MESSAGE - 70, // SEQ_LEVEL_KOOPA_ROAD - 70, // SEQ_EVENT_HIGH_SCORE - 65, // SEQ_EVENT_MERRY_GO_ROUND - 80, // SEQ_EVENT_RACE - 70, // SEQ_EVENT_CUTSCENE_STAR_SPAWN - 85, // SEQ_EVENT_BOSS - 75, // SEQ_EVENT_CUTSCENE_COLLECT_KEY - 75, // SEQ_EVENT_ENDLESS_STAIRS - 85, // SEQ_LEVEL_BOSS_KOOPA_FINAL - 70, // SEQ_EVENT_CUTSCENE_CREDITS - 80, // SEQ_EVENT_SOLVE_PUZZLE - 80, // SEQ_EVENT_TOAD_MESSAGE - 70, // SEQ_EVENT_PEACH_MESSAGE - 75, // SEQ_EVENT_CUTSCENE_INTRO - 80, // SEQ_EVENT_CUTSCENE_VICTORY - 70, // SEQ_EVENT_CUTSCENE_ENDING - 65, // SEQ_MENU_FILE_SELECT - 0, // SEQ_EVENT_CUTSCENE_LAKITU (not in JP) -}; - -STATIC_ASSERT(ARRAY_COUNT(sBackgroundMusicDefaultVolume) == SEQ_COUNT, - "change this array if you are adding sequences"); - -*/ - u8 sCurrentBackgroundMusicSeqId = SEQUENCE_NONE; u8 sMusicDynamicDelay = 0; u8 sSoundBankUsedListBack[SOUND_BANK_COUNT] = {[0 ... SOUND_BANK_COUNT-1] = 0}; diff --git a/src/audio/heap.c b/src/audio/heap.c index 75161172d8..c6dece2519 100644 --- a/src/audio/heap.c +++ b/src/audio/heap.c @@ -732,7 +732,7 @@ size = ALIGN16(size); } } - // TODO: why is this guaranteed to write <= 32 entries...? + // DECOMP_DO: why is this guaranteed to write <= 32 entries...? // Because the buffer is small enough that more don't fit? arg0->persistent.entries[arg0->persistent.numEntries].id = id; arg0->persistent.entries[arg0->persistent.numEntries].size = size; @@ -1011,11 +1011,11 @@ void init_reverb_eu(void) { reverb->unk28 = soundAlloc(&gNotesAndBuffersPool, (16 * sizeof(s16))); for (i = 0; i < gAudioBufferParameters.updatesPerFrame; i++) { mem = soundAlloc(&gNotesAndBuffersPool, DEFAULT_LEN_2CH); - reverb->items[0][i].toDownsampleLeft = mem; - reverb->items[0][i].toDownsampleRight = (mem + (DEFAULT_LEN_1CH / sizeof(s16))); + reverb->items[0][i].toBeDownsampledLeft = mem; + reverb->items[0][i].toBeDownsampledRight = (mem + (DEFAULT_LEN_1CH / sizeof(s16))); mem = soundAlloc(&gNotesAndBuffersPool, DEFAULT_LEN_2CH); - reverb->items[1][i].toDownsampleLeft = mem; - reverb->items[1][i].toDownsampleRight = (mem + (DEFAULT_LEN_1CH / sizeof(s16))); + reverb->items[1][i].toBeDownsampledLeft = mem; + reverb->items[1][i].toBeDownsampledRight = (mem + (DEFAULT_LEN_1CH / sizeof(s16))); } } @@ -1034,7 +1034,7 @@ void init_reverb_eu(void) { bzero(reverb->unk28, (16 * sizeof(s16))); // All reverb downsample buffers are adjacent in memory, so clear them all in a single call - bzero(reverb->items[0][0].toDownsampleLeft, (DEFAULT_LEN_1CH * 4 * gAudioBufferParameters.updatesPerFrame)); + bzero(reverb->items[0][0].toBeDownsampledLeft, (DEFAULT_LEN_1CH * 4 * gAudioBufferParameters.updatesPerFrame)); } } } @@ -1116,11 +1116,11 @@ void init_reverb_us(s32 presetId) { gSynthesisReverb.unk28 = soundAlloc(&gNotesAndBuffersPool, (16 * sizeof(s16))); for (i = 0; i < gAudioUpdatesPerFrame; i++) { mem = soundAlloc(&gNotesAndBuffersPool, DEFAULT_LEN_2CH); - gSynthesisReverb.items[0][i].toDownsampleLeft = mem; - gSynthesisReverb.items[0][i].toDownsampleRight = (mem + (DEFAULT_LEN_1CH / sizeof(s16))); + gSynthesisReverb.items[0][i].toBeDownsampledLeft = mem; + gSynthesisReverb.items[0][i].toBeDownsampledRight = (mem + (DEFAULT_LEN_1CH / sizeof(s16))); mem = soundAlloc(&gNotesAndBuffersPool, DEFAULT_LEN_2CH); - gSynthesisReverb.items[1][i].toDownsampleLeft = mem; - gSynthesisReverb.items[1][i].toDownsampleRight = (mem + (DEFAULT_LEN_1CH / sizeof(s16))); + gSynthesisReverb.items[1][i].toBeDownsampledLeft = mem; + gSynthesisReverb.items[1][i].toBeDownsampledRight = (mem + (DEFAULT_LEN_1CH / sizeof(s16))); } } else { bzero(gSynthesisReverb.ringBuffer.left, (REVERB_WINDOW_SIZE_MAX * 2 * sizeof(s16))); @@ -1143,7 +1143,7 @@ void init_reverb_us(s32 presetId) { bzero(gSynthesisReverb.unk28, (16 * sizeof(s16))); // All reverb downsample buffers are adjacent in memory, so clear them all in a single call - bzero(gSynthesisReverb.items[0][0].toDownsampleLeft, (DEFAULT_LEN_1CH * 4 * gAudioUpdatesPerFrame)); + bzero(gSynthesisReverb.items[0][0].toBeDownsampledLeft, (DEFAULT_LEN_1CH * 4 * gAudioUpdatesPerFrame)); } } diff --git a/src/audio/heap.h b/src/audio/heap.h index f34a5a6738..87b67fa70c 100644 --- a/src/audio/heap.h +++ b/src/audio/heap.h @@ -39,7 +39,7 @@ struct SeqOrBankEntry { struct PersistentPool { /*0x00*/ u32 numEntries; /*0x04*/ struct SoundAllocPool pool; -#ifdef EXPAND_AUDIO_HEAP // TODO: Make this a configurable define rather than using static values +#ifdef EXPAND_AUDIO_HEAP // HACKERSM64_DO: Make this a configurable define rather than using static values /*0x14*/ struct SeqOrBankEntry entries[64]; // size = 0x314 #else diff --git a/src/audio/internal.h b/src/audio/internal.h index a70d556607..81a0f9dcf9 100644 --- a/src/audio/internal.h +++ b/src/audio/internal.h @@ -632,7 +632,7 @@ struct Note { // that results in messy US/EU ifdefs. Instead we cast to a struct pointer // when needed... This breaks alignment on non-N64 platforms, which we hack // around by skipping the padding in that case. - // TODO: use macros or something instead. + // DECOMP_DO: use macros or something instead. #ifdef TARGET_N64 u8 pad0[12]; #endif diff --git a/src/audio/load.c b/src/audio/load.c index c663d93c10..5a44a969ca 100644 --- a/src/audio/load.c +++ b/src/audio/load.c @@ -250,7 +250,7 @@ void *dma_sample_data(uintptr_t devAddr, u32 size, s32 arg2, u8 *dmaIndexRef) { transfer = dma->bufSize; dmaDevAddr = devAddr & ~0xF; dma->source = dmaDevAddr; -#ifdef VERSION_US // TODO: Is there a reason this only exists in US? +#ifdef VERSION_US // HACKERSM64_DO: Is there a reason this only exists in US? osInvalDCache(dma->buffer, transfer); #endif osPiStartDma(&gCurrAudioFrameDmaIoMesgBufs[gCurrAudioFrameDmaCount++], OS_MESG_PRI_NORMAL, @@ -343,7 +343,7 @@ void patch_sound(UNUSED struct AudioBankSound *sound, UNUSED u8 *memBase, UNUSED #if defined(VERSION_EU) else if (sample->loaded == 0x80) { PATCH(sample->sampleAddr, offsetBase); - u8 *mem = soundAlloc(&gNotesAndBuffersPool, sample->sampleSize); // TODO: Memory issue most likely! + u8 *mem = soundAlloc(&gNotesAndBuffersPool, sample->sampleSize); // HACKERSM64_DO: Memory issue most likely! if (mem == NULL) { sample->sampleAddr = patched; sample->loaded = 1; diff --git a/src/audio/port_sh.c b/src/audio/port_sh.c index 517a628a70..d2638695f5 100644 --- a/src/audio/port_sh.c +++ b/src/audio/port_sh.c @@ -1,5 +1,5 @@ #ifdef VERSION_SH -// TODO: merge this with port_eu.c? +// DECOMP_DO: merge this with port_eu.c? #include @@ -445,7 +445,7 @@ UNUSED s32 func_sh_802f6900(void) { return sp18 == gAudioResetPresetIdToLoad; } -// TODO: (Scrub C) +// DECOMP_DO: (Scrub C) void func_sh_802f6958(OSMesg mesg) { s32 a; OSMesg recvMesg; diff --git a/src/audio/synthesis.c b/src/audio/synthesis.c index 10f027c01e..5443cbbf53 100644 --- a/src/audio/synthesis.c +++ b/src/audio/synthesis.c @@ -229,16 +229,16 @@ void prepare_reverb_ring_buffer(s32 chunkLen, u32 updateIndex) { item = &gSynthesisReverb.items[gSynthesisReverb.curFrame][updateIndex]; // Touches both left and right since they are adjacent in memory - osInvalDCache(item->toDownsampleLeft, DEFAULT_LEN_2CH); + osInvalDCache(item->toBeDownsampledLeft, DEFAULT_LEN_2CH); for (srcPos = 0, dstPos = 0; dstPos < item->lengthA / 2; srcPos += gReverbDownsampleRate, dstPos++) { - gSynthesisReverb.ringBuffer.left[dstPos + item->startPos] = item->toDownsampleLeft[srcPos]; - gSynthesisReverb.ringBuffer.right[dstPos + item->startPos] = item->toDownsampleRight[srcPos]; + gSynthesisReverb.ringBuffer.left[dstPos + item->startPos] = item->toBeDownsampledLeft[srcPos]; + gSynthesisReverb.ringBuffer.right[dstPos + item->startPos] = item->toBeDownsampledRight[srcPos]; } for (dstPos = 0; dstPos < item->lengthB / 2; srcPos += gReverbDownsampleRate, dstPos++) { - gSynthesisReverb.ringBuffer.left[dstPos] = item->toDownsampleLeft[srcPos]; - gSynthesisReverb.ringBuffer.right[dstPos] = item->toDownsampleRight[srcPos]; + gSynthesisReverb.ringBuffer.left[dstPos] = item->toBeDownsampledLeft[srcPos]; + gSynthesisReverb.ringBuffer.right[dstPos] = item->toBeDownsampledRight[srcPos]; } } #ifdef BETTER_REVERB @@ -254,10 +254,10 @@ void prepare_reverb_ring_buffer(s32 chunkLen, u32 updateIndex) { loopCounts[1] = item->lengthB / 2; if (gReverbDownsampleRate != 1) { - // NOTE: / HACKERSM64 TODO: Commenting this check seems to improve runtime by about 100 microseconds (per 30fps frame), + // NOTE: / HACKERSM64_DO: Commenting this check seems to improve runtime by about 100 microseconds (per 30fps frame), // but idk enough about why it was added here in vanilla to comfortably remove it. Is it supposed to act as an // optimization (that isn't actually an optimization) or is it a safety measure since it's loaded from the RSP? - osInvalDCache(item->toDownsampleLeft, DEFAULT_LEN_2CH); + osInvalDCache(item->toBeDownsampledLeft, DEFAULT_LEN_2CH); } betterReverbSampleBuffers[SYNTH_CHANNEL_LEFT][0] = &gSynthesisReverb.ringBuffer.left[item->startPos]; @@ -265,10 +265,10 @@ void prepare_reverb_ring_buffer(s32 chunkLen, u32 updateIndex) { betterReverbSampleBuffers[SYNTH_CHANNEL_RIGHT][0] = &gSynthesisReverb.ringBuffer.right[item->startPos]; betterReverbSampleBuffers[SYNTH_CHANNEL_RIGHT][1] = &gSynthesisReverb.ringBuffer.right[0]; if (gReverbDownsampleRate > 1) { - betterReverbDownsampleBuffers[SYNTH_CHANNEL_LEFT][0] = &item->toDownsampleLeft[0]; - betterReverbDownsampleBuffers[SYNTH_CHANNEL_LEFT][1] = &item->toDownsampleLeft[loopCounts[0] * gReverbDownsampleRate]; - betterReverbDownsampleBuffers[SYNTH_CHANNEL_RIGHT][0] = &item->toDownsampleRight[0]; - betterReverbDownsampleBuffers[SYNTH_CHANNEL_RIGHT][1] = &item->toDownsampleRight[loopCounts[0] * gReverbDownsampleRate]; + betterReverbDownsampleBuffers[SYNTH_CHANNEL_LEFT][0] = &item->toBeDownsampledLeft[0]; + betterReverbDownsampleBuffers[SYNTH_CHANNEL_LEFT][1] = &item->toBeDownsampledLeft[loopCounts[0] * gReverbDownsampleRate]; + betterReverbDownsampleBuffers[SYNTH_CHANNEL_RIGHT][0] = &item->toBeDownsampledRight[0]; + betterReverbDownsampleBuffers[SYNTH_CHANNEL_RIGHT][1] = &item->toBeDownsampledRight[loopCounts[0] * gReverbDownsampleRate]; } else { betterReverbDownsampleBuffers[SYNTH_CHANNEL_LEFT][0] = betterReverbSampleBuffers[SYNTH_CHANNEL_LEFT][0]; betterReverbDownsampleBuffers[SYNTH_CHANNEL_LEFT][1] = betterReverbSampleBuffers[SYNTH_CHANNEL_LEFT][1]; @@ -473,7 +473,7 @@ u64 *synthesis_do_one_audio_update(s16 *aiBuf, u32 bufLen, u64 *cmd, s32 updateI // Downsampling is done later by CPU when RSP is done, therefore we need to have double // buffering. Left and right buffers are adjacent in memory. aSetBuffer(cmd++, 0, 0, DMEM_ADDR_WET_LEFT_CH, DEFAULT_LEN_2CH); - aSaveBuffer(cmd++, VIRTUAL_TO_PHYSICAL2(gSynthesisReverb.items[gSynthesisReverb.curFrame][updateIndex].toDownsampleLeft)); + aSaveBuffer(cmd++, VIRTUAL_TO_PHYSICAL2(gSynthesisReverb.items[gSynthesisReverb.curFrame][updateIndex].toBeDownsampledLeft)); gSynthesisReverb.resampleFlags = 0; } } diff --git a/src/audio/synthesis.h b/src/audio/synthesis.h index 467e1dcc64..da8250e473 100644 --- a/src/audio/synthesis.h +++ b/src/audio/synthesis.h @@ -110,8 +110,8 @@ STATIC_ASSERT(BETTER_REVERB_FILTER_COUNT_LIGHT <= NUM_ALLPASS, "BETTER_REVERB_FI struct ReverbRingBufferItem { s16 numSamplesAfterDownsampling; s16 chunkLen; // never read - s16 *toDownsampleLeft; - s16 *toDownsampleRight; // data pointed to by left and right are adjacent in memory + s16 *toBeDownsampledLeft; + s16 *toBeDownsampledRight; // data pointed to by left and right are adjacent in memory s32 startPos; // start pos in ring buffer s16 lengthA; // first length in ring buffer (from startPos, at most until end) s16 lengthB; // second length in ring buffer (from pos 0) diff --git a/src/audio/synthesis_sh.c b/src/audio/synthesis_sh.c index 8e26737a20..3b61f72075 100644 --- a/src/audio/synthesis_sh.c +++ b/src/audio/synthesis_sh.c @@ -70,16 +70,16 @@ void prepare_reverb_ring_buffer(s32 chunkLen, u32 updateIndex, s32 reverbIndex) item = &reverb->items[reverb->curFrame][updateIndex]; // Touches both left and right since they are adjacent in memory - osInvalDCache(item->toDownsampleLeft, DEFAULT_LEN_2CH); + osInvalDCache(item->toBeDownsampledLeft, DEFAULT_LEN_2CH); for (srcPos = 0, dstPos = 0; dstPos < item->lengthA / 2; srcPos += reverb->downsampleRate, dstPos++) { - reverb->ringBuffer.left[item->startPos + dstPos] = item->toDownsampleLeft[srcPos]; - reverb->ringBuffer.right[item->startPos + dstPos] = item->toDownsampleRight[srcPos]; + reverb->ringBuffer.left[item->startPos + dstPos] = item->toBeDownsampledLeft[srcPos]; + reverb->ringBuffer.right[item->startPos + dstPos] = item->toBeDownsampledRight[srcPos]; } for (dstPos = 0; dstPos < item->lengthB / 2; srcPos += reverb->downsampleRate, dstPos++) { - reverb->ringBuffer.left[dstPos] = item->toDownsampleLeft[srcPos]; - reverb->ringBuffer.right[dstPos] = item->toDownsampleRight[srcPos]; + reverb->ringBuffer.left[dstPos] = item->toBeDownsampledLeft[srcPos]; + reverb->ringBuffer.right[dstPos] = item->toBeDownsampledRight[srcPos]; } } } @@ -149,7 +149,7 @@ void synthesis_load_note_subs_eu(s32 updateIndex) { } } -// TODO: (Scrub C) pointless mask and whitespace +// DECOMP_DO: (Scrub C) pointless mask and whitespace u64 *synthesis_execute(u64 *cmdBuf, s32 *writtenCmds, s16 *aiBuf, s32 bufLen) { s32 i, j; u32 *aiBufPtr; @@ -262,7 +262,7 @@ u64 *synthesis_save_reverb_samples(u64 *cmd, s16 reverbIndex, s16 updateIndex) { // Downsampling is done later by CPU when RSP is done, therefore we need to have double // buffering. Left and right buffers are adjacent in memory. aSaveBuffer(cmd++, DMEM_ADDR_WET_LEFT_CH, - VIRTUAL_TO_PHYSICAL2(gSynthesisReverbs[reverbIndex].items[gSynthesisReverbs[reverbIndex].curFrame][updateIndex].toDownsampleLeft), DEFAULT_LEN_2CH); + VIRTUAL_TO_PHYSICAL2(gSynthesisReverbs[reverbIndex].items[gSynthesisReverbs[reverbIndex].curFrame][updateIndex].toBeDownsampledLeft), DEFAULT_LEN_2CH); break; } gSynthesisReverbs[reverbIndex].resampleFlags = 0; diff --git a/src/engine/behavior_script.c b/src/engine/behavior_script.c index 282b8b3b11..b6fce433a5 100644 --- a/src/engine/behavior_script.c +++ b/src/engine/behavior_script.c @@ -126,7 +126,7 @@ static s32 bhv_cmd_spawn_obj(void) { struct Object *object = spawn_object_at_origin(gCurrentObject, 0, model, behavior); obj_copy_pos_and_angle(object, gCurrentObject); - // TODO: Does this cmd need renaming? This line is the only difference between this and the above func. + // DECOMP_DO: Does this cmd need renaming? This line is the only difference between this and the above func. gCurrentObject->prevObj = object; gCurBhvCommand += 3; diff --git a/src/engine/geo_layout.c b/src/engine/geo_layout.c index cf217a936d..1ea850a0bc 100644 --- a/src/engine/geo_layout.c +++ b/src/engine/geo_layout.c @@ -211,7 +211,7 @@ void geo_layout_cmd_node_root(void) { graphNode = init_graph_node_root(gGraphNodePool, NULL, 0, x, y, width, height); - // TODO: check type + // DECOMP_DO: check type gGeoViews = alloc_only_pool_alloc(gGraphNodePool, gGeoNumViews * sizeof(struct GraphNode *)); graphNode->views = gGeoViews; diff --git a/src/engine/level_script.c b/src/engine/level_script.c index a6246c0dc4..6b97c02415 100644 --- a/src/engine/level_script.c +++ b/src/engine/level_script.c @@ -300,7 +300,7 @@ static void level_cmd_load_yay0(void) { static void level_cmd_load_mario_head(void) { #ifdef KEEP_MARIO_HEAD - // TODO: Fix these hardcoded sizes + // DECOMP_DO: Fix these hardcoded sizes void *addr = main_pool_alloc(DOUBLE_SIZE_ON_64_BIT(0xE1000), MEMORY_POOL_LEFT); if (addr != NULL) { gdm_init(addr, DOUBLE_SIZE_ON_64_BIT(0xE1000)); diff --git a/src/engine/math_util.c b/src/engine/math_util.c index a9c18e18d7..f032809293 100644 --- a/src/engine/math_util.c +++ b/src/engine/math_util.c @@ -740,7 +740,7 @@ enum gSplineStates { * I suspect that the weight formulas will give a 3rd degree B-spline with the * common uniform clamped knot vector, e.g. for n points: * [0, 0, 0, 0, 1, 2, ... n-1, n, n, n, n] - * TODO: verify the classification of the spline / figure out how polynomials were computed + * DECOMP_DO: verify the classification of the spline / figure out how polynomials were computed */ void spline_get_weights(Vec4f result, f32 t, UNUSED s32 c) { f32 tinv = 1 - t; diff --git a/src/engine/surface_collision.c b/src/engine/surface_collision.c index f87a386e2e..8cf209efc8 100644 --- a/src/engine/surface_collision.c +++ b/src/engine/surface_collision.c @@ -751,7 +751,7 @@ s32 find_water_level_and_floor(s32 x, s32 y, s32 z, struct Surface **pfloor) { /** * Finds the height of water at a given location. */ -s32 find_water_level(s32 x, s32 z) { // TODO: Allow y pos +s32 find_water_level(s32 x, s32 z) { // HACKERSM64_DO: Allow y pos s32 val; s32 loX, hiX, loZ, hiZ; TerrainData *p = gEnvironmentRegions; diff --git a/src/game/behaviors/activated_bf_plat.inc.c b/src/game/behaviors/activated_bf_plat.inc.c index c1cfd0188e..13e750cd37 100644 --- a/src/game/behaviors/activated_bf_plat.inc.c +++ b/src/game/behaviors/activated_bf_plat.inc.c @@ -26,7 +26,7 @@ static Collision const *sActivatedBackAndForthPlatformCollisionModels[] = { /** * Activated back-and-forth platform initialization function. */ -//! TODO: Param names +//! HACKERSM64_DO: Param names void bhv_activated_back_and_forth_platform_init(void) { // Equivalent to the first behavior param byte & 3 (last 2 bits of the byte). s32 platformType = GET_BPARAM1(o->oBehParams) & ACTIVATED_BF_PLAT_TYPES_MASK; diff --git a/src/game/behaviors/camera_lakitu.inc.c b/src/game/behaviors/camera_lakitu.inc.c index 7319113649..09a95ed89c 100644 --- a/src/game/behaviors/camera_lakitu.inc.c +++ b/src/game/behaviors/camera_lakitu.inc.c @@ -2,7 +2,7 @@ /** * Behavior for bhvCameraLakitu. This includes both the intro lakitu and the * lakitu visible in the mirror room. - * TODO: Processing order relative to bhvCloud + * DECOMP_DO: Processing order relative to bhvCloud */ /** @@ -40,7 +40,7 @@ static void camera_lakitu_intro_act_trigger_cutscene(void) { } /** - * Warp up into the air and spawn cloud, then enter the TODO action. + * Warp up into the air and spawn cloud, then enter the lakitu dialog action. */ static void camera_lakitu_intro_act_spawn_cloud(void) { if (set_mario_npc_dialog(MARIO_DIALOG_LOOK_UP) == MARIO_DIALOG_STATUS_SPEAK) { diff --git a/src/game/behaviors/chain_chomp.inc.c b/src/game/behaviors/chain_chomp.inc.c index f3831896fe..a9e06f411f 100644 --- a/src/game/behaviors/chain_chomp.inc.c +++ b/src/game/behaviors/chain_chomp.inc.c @@ -181,7 +181,7 @@ static void chain_chomp_sub_act_lunge(void) { o->oChainChompSignedMaxDistBetweenChainParts = 30.0f; } - // // TODO: What is this + // // DECOMP_DO: What is this // if ((val04 = (900.0f - o->oChainChompDistToPivot)) > 220.0f) { // val04 = 220.0f; // } diff --git a/src/game/behaviors/enemy_lakitu.inc.c b/src/game/behaviors/enemy_lakitu.inc.c index b120d7dc80..342c6a9b20 100644 --- a/src/game/behaviors/enemy_lakitu.inc.c +++ b/src/game/behaviors/enemy_lakitu.inc.c @@ -2,7 +2,7 @@ /** * Behavior for bhvEnemyLakitu. * Lakitu comes before it spawned spinies in processing order. - * TODO: bhvCloud processing oredr + * DECOMP_DO: bhvCloud processing order */ /** @@ -122,7 +122,7 @@ static void enemy_lakitu_sub_act_hold_spiny(void) { if (o->oEnemyLakituSpinyCooldown != 0) { o->oEnemyLakituSpinyCooldown--; } - // TODO: Check if anything interesting happens if we bypass this with speed + // DECOMP_DO: Check if anything interesting happens if we bypass this with speed else if (o->oDistanceToMario > o->oDrawingDistance - 100.0f || (o->oDistanceToMario < 500.0f && abs_angle_diff(o->oAngleToMario, o->oFaceAngleYaw) < 0x2000)) { diff --git a/src/game/behaviors/falling_rising_platform.inc.c b/src/game/behaviors/falling_rising_platform.inc.c index cc00e37fd9..645b97658e 100644 --- a/src/game/behaviors/falling_rising_platform.inc.c +++ b/src/game/behaviors/falling_rising_platform.inc.c @@ -10,7 +10,7 @@ void bhv_bitfs_sinking_platform_loop(void) { o->oBitfsPlatformTimer += 0x100; } -// TODO: Named incorrectly. fix +// DECOMP_DO: Named incorrectly. fix void bhv_ddd_moving_pole_loop(void) { obj_copy_pos_and_angle(o, o->parentObj); } diff --git a/src/game/behaviors/ground_particles.inc.c b/src/game/behaviors/ground_particles.inc.c index eeba7d4653..0fa2c7b64b 100644 --- a/src/game/behaviors/ground_particles.inc.c +++ b/src/game/behaviors/ground_particles.inc.c @@ -61,7 +61,7 @@ void spawn_smoke_with_velocity(void) { obj_translate_xyz_random(smoke, sSmokeMovementParams[3]); } -// TODO Fix name +// DECOMP_DO: Fix name void clear_particle_flags(u32 flags) { o->parentObj->oActiveParticleFlags &= flags ^ 0xFFFFFFFF; // Clear the flags given (could just be ~flags) } diff --git a/src/game/behaviors/piranha_bubbles.inc.c b/src/game/behaviors/piranha_bubbles.inc.c index 97673af101..3798d818c3 100644 --- a/src/game/behaviors/piranha_bubbles.inc.c +++ b/src/game/behaviors/piranha_bubbles.inc.c @@ -32,7 +32,7 @@ void bhv_piranha_plant_bubble_loop(void) { f32 scale = 0; s32 i; s32 animFrame = parent->header.gfx.animInfo.animFrame; - // TODO: rename lastFrame if it is inaccurate + // DECOMP_DO: rename lastFrame if it is inaccurate s32 lastFrame = parent->header.gfx.animInfo.curAnim->loopEnd - 2; cur_obj_set_pos_relative(parent, 0, 72.0f, 180.0f); diff --git a/src/game/behaviors/platform_on_track.inc.c b/src/game/behaviors/platform_on_track.inc.c index beb1a46772..48bd02f531 100644 --- a/src/game/behaviors/platform_on_track.inc.c +++ b/src/game/behaviors/platform_on_track.inc.c @@ -149,7 +149,7 @@ void bhv_platform_on_track_init(void) { o->oPlatformOnTrackIsNotHMC = pathIndex - 4; - o->oBehParams2ndByte = o->oMoveAngleYaw; // TODO: Weird? + o->oBehParams2ndByte = o->oMoveAngleYaw; // DECOMP_DO: Weird? if (o->oPlatformOnTrackType == PLATFORM_ON_TRACK_TYPE_CHECKERED) { o->header.gfx.scale[1] = 2.0f; diff --git a/src/game/behaviors/pyramid_top.inc.c b/src/game/behaviors/pyramid_top.inc.c index 8a98d6aba1..a15e077671 100644 --- a/src/game/behaviors/pyramid_top.inc.c +++ b/src/game/behaviors/pyramid_top.inc.c @@ -26,7 +26,7 @@ void bhv_pyramid_top_init(void) { * fragments in the process. */ void bhv_pyramid_top_spinning(void) { - // (TODO: What is this doing) + // (DECOMP_DO: What is this doing) o->oPosX = o->oHomeX + sins(o->oTimer * 0x4000) * 40.0f; // At first, move upward smoothly without rotating. diff --git a/src/game/behaviors/triplet_butterfly.inc.c b/src/game/behaviors/triplet_butterfly.inc.c index 08fdc46799..c65aa9c43c 100644 --- a/src/game/behaviors/triplet_butterfly.inc.c +++ b/src/game/behaviors/triplet_butterfly.inc.c @@ -36,7 +36,7 @@ static void triplet_butterfly_act_init(void) { o->oTripletButterflySelectedButterfly = random_u16() % 3; } - //! TODO: Describe this glitch + //! DECOMP_DO: Describe this glitch if (o->parentObj->oTripletButterflySelectedButterfly == o->oBehParams2ndByte) { o->oTripletButterflyType = TRIPLET_BUTTERFLY_TYPE_SPAWN_1UP; } else if (o->parentObj->oBehParams2ndByte & TRIPLET_BUTTERFLY_BP_NO_BOMBS) { diff --git a/src/game/behaviors/ukiki.inc.c b/src/game/behaviors/ukiki.inc.c index 293e0eb5ba..2fd4c67fff 100644 --- a/src/game/behaviors/ukiki.inc.c +++ b/src/game/behaviors/ukiki.inc.c @@ -35,7 +35,7 @@ s32 is_cap_ukiki_and_mario_has_normal_cap_on_head(void) { Gfx *geo_update_projectile_pos_from_parent_copy(s32 callContext, UNUSED struct GraphNode *node, Mat4 mtx) { if (callContext == GEO_CONTEXT_RENDER) { - // TODO: change global type to Object pointer + // DECOMP_DO: change global type to Object pointer struct Object *obj = (struct Object *) gCurGraphNodeObject; if (obj->prevObj != NULL) { diff --git a/src/game/behaviors/water_bomb.inc.c b/src/game/behaviors/water_bomb.inc.c index 7ea7651d11..f210de6b34 100644 --- a/src/game/behaviors/water_bomb.inc.c +++ b/src/game/behaviors/water_bomb.inc.c @@ -239,7 +239,7 @@ void bhv_water_bomb_shadow_update(void) { if (o->parentObj->oAction == WATER_BOMB_ACT_EXPLODE) { obj_mark_for_deletion(o); } else { - // TODO: What is happening here + // DECOMP_DO: What is happening here f32 bombHeight = o->parentObj->oPosY - o->parentObj->oFloorHeight; if (bombHeight > 500.0f) { bombHeight = 500.0f; diff --git a/src/game/behaviors/water_mist.inc.c b/src/game/behaviors/water_mist.inc.c index a11fd24a6a..fd0299dc34 100644 --- a/src/game/behaviors/water_mist.inc.c +++ b/src/game/behaviors/water_mist.inc.c @@ -1,5 +1,5 @@ // water_mist.inc.c -// TODO: there is confusion with the earlier mist file. Clarify? +// DECOMP_DO: there is confusion with the earlier mist file. Clarify? void bhv_water_mist_2_loop(void) { o->oPosY = find_water_level(o->oHomeX, o->oHomeZ) + 20.0f; diff --git a/src/game/behaviors/water_mist_particle.inc.c b/src/game/behaviors/water_mist_particle.inc.c index 6df0978bc8..cf9558e25f 100644 --- a/src/game/behaviors/water_mist_particle.inc.c +++ b/src/game/behaviors/water_mist_particle.inc.c @@ -1,5 +1,5 @@ // water_mist_particle.inc.c -// TODO: Is this really "mist"? +// DECOMP_DO: Is this really "mist"? void bhv_water_mist_spawn_loop(void) { clear_particle_flags(ACTIVE_PARTICLE_BREATH); diff --git a/src/game/behaviors/water_objs.inc.c b/src/game/behaviors/water_objs.inc.c index 3928731c8c..8c5290c5f8 100644 --- a/src/game/behaviors/water_objs.inc.c +++ b/src/game/behaviors/water_objs.inc.c @@ -1,5 +1,5 @@ // water_objs.inc.c -// TODO: Better name, please +// DECOMP_DO: Better name, please void bhv_water_air_bubble_init(void) { cur_obj_scale(4.0f); diff --git a/src/game/behaviors/water_wave.inc.c b/src/game/behaviors/water_wave.inc.c index a18cf7c513..11250948dc 100644 --- a/src/game/behaviors/water_wave.inc.c +++ b/src/game/behaviors/water_wave.inc.c @@ -1,5 +1,5 @@ // water_wave.inc.c -// TODO: Rename to avoid confusion with water_splashes_and_waves +// DECOMP_DO: Rename to avoid confusion with water_splashes_and_waves void bhv_object_water_wave_init(void) { o->oPosY = find_water_level(o->oPosX, o->oPosZ); diff --git a/src/game/behaviors/wiggler.inc.c b/src/game/behaviors/wiggler.inc.c index 6609c72395..8da5ae920d 100644 --- a/src/game/behaviors/wiggler.inc.c +++ b/src/game/behaviors/wiggler.inc.c @@ -70,7 +70,7 @@ void bhv_wiggler_body_part_update(void) { o->oFaceAnglePitch = segment->angle[0]; o->oFaceAngleYaw = segment->angle[1]; - // TODO: What is this for? + // DECOMP_DO: What is this for? f32 posOffset = -37.5f * o->header.gfx.scale[0]; d[1] = posOffset * coss(o->oFaceAnglePitch) - posOffset; f32 dxz = posOffset * sins(o->oFaceAnglePitch); @@ -85,7 +85,7 @@ void bhv_wiggler_body_part_update(void) { // the floor o->oPosY -= 30.0f; cur_obj_update_floor_height(); - if (o->oFloorHeight > o->oPosY) { // TODO: Check ineq swap + if (o->oFloorHeight > o->oPosY) { // DECOMP_DO: Check ineq swap o->oPosY = o->oFloorHeight; } } diff --git a/src/game/camera.c b/src/game/camera.c index 8bb3fe3823..f84e431914 100644 --- a/src/game/camera.c +++ b/src/game/camera.c @@ -6664,7 +6664,7 @@ void init_spline_point(struct CutsceneSplinePoint *splinePoint, s8 index, u8 spe vec3s_copy(splinePoint->point, point); } -// TODO: (Scrub C) +// DECOMP_DO: (Scrub C) void copy_spline_segment(struct CutsceneSplinePoint dst[], struct CutsceneSplinePoint src[]) { s32 j = 0; s32 i = 0; @@ -10362,7 +10362,7 @@ struct Cutscene sCutsceneReadMessage[] = { { cutscene_read_message_end, 0 } }; -/* TODO: +/* DECOMP_DO: * The next two arrays are both related to levels, and they look generated. * These should be split into their own file. */ @@ -10437,7 +10437,7 @@ STATIC_ASSERT(ARRAY_COUNT(sZoomOutAreaMasks) - 1 == LEVEL_MAX / 2, "Make sure yo /* * credits spline paths. - * TODO: Separate these into their own file(s) + * DECOMP_DO: Separate these into their own file(s) */ struct CutsceneSplinePoint sBobCreditsSplinePositions[] = { diff --git a/src/game/camera.h b/src/game/camera.h index fcd1f59f97..c339f92567 100644 --- a/src/game/camera.h +++ b/src/game/camera.h @@ -714,7 +714,7 @@ extern struct Object *gCutsceneFocus; extern struct Object *gSecondCameraFocus; extern u8 gRecentCutscene; -// TODO: sort all of this extremely messy shit out after the split +// DECOMP_DO: sort all of this extremely messy shit out after the split void set_camera_shake_from_hit(s16 shake); void set_environmental_camera_shake(s16 shake); diff --git a/src/game/debug.c b/src/game/debug.c index 4151d8cbfc..a34b8abe74 100644 --- a/src/game/debug.c +++ b/src/game/debug.c @@ -391,7 +391,7 @@ void try_modify_debug_controls(void) { } } -// possibly a removed debug control (TODO: check DD) +// possibly a removed debug control (DECOMP_DO: check DD) void stub_debug_control(void) { } @@ -474,9 +474,9 @@ void try_do_mario_debug_object_spawn(void) { } } -// TODO: figure out what this is +// DECOMP_DO: figure out what this is void debug_print_obj_move_flags(void) { -#ifndef VERSION_EU // TODO: Is there a better way to diff this? static EU doesn't seem to work. +#ifndef VERSION_EU // DECOMP_DO: Is there a better way to diff this? static EU doesn't seem to work. if (gCurrentObject->oMoveFlags & OBJ_MOVE_LANDED) { print_debug_top_down_objectinfo("BOUND %x", gCurrentObject->oMoveFlags); } diff --git a/src/game/emutest.h b/src/game/emutest.h index fca7610a39..b90b647786 100644 --- a/src/game/emutest.h +++ b/src/game/emutest.h @@ -30,10 +30,10 @@ enum SystemCapabilities { // Whether the system can edit the framebuffer in software SUPPORTS_SOFTWARE_FRAMEBUFFER = (1 << 3), - // TODO: `emux` is a developing standard. + // HACKERSM64_DO: `emux` is a developing standard. // SUPPORTS_EMULATOR_EXTENSIONS = (1 << 4), // i.e. `emux` - // TODO: Figure out what these mean and implement them too + // HACKERSM64_DO: Figure out what these mean and implement them too // SUPPORTS_DMA_TIMING = 0, // SUPPORTS_RSP_PIPELINE_STALL_TIMING = 0, }; diff --git a/src/game/ingame_menu.c b/src/game/ingame_menu.c index 3ec5077db1..b02e9fda83 100644 --- a/src/game/ingame_menu.c +++ b/src/game/ingame_menu.c @@ -87,7 +87,7 @@ enum DialogBoxType { #define DEFAULT_DIALOG_BOX_ANGLE 90.0f #define DEFAULT_DIALOG_BOX_SCALE 19.0f -u8 gDialogCharWidths[256] = { // TODO: Is there a way to auto generate this? +u8 gDialogCharWidths[256] = { // DECOMP_DO: Is there a way to auto generate this? 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 5, 8, 8, 6, 6, 6, 6, 6, 5, 6, 6, 8, 7, 6, 6, 6, 5, 5, 6, 5, 5, 6, 5, 4, 5, 5, 3, @@ -407,7 +407,7 @@ void print_generic_string(s16 x, s16 y, const u8 *str) { rgbaColors[2], rgbaColors[3]); } else if (customColor == 2) { - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, 255); // TODO: Is it possible to retrieve the original color that was set before print_generic_string was called? + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, 255); // HACKERSM64_DO: Is it possible to retrieve the original color that was set before print_generic_string was called? customColor = 0; } break; diff --git a/src/game/level_update.c b/src/game/level_update.c index 9219167bef..d00005e170 100644 --- a/src/game/level_update.c +++ b/src/game/level_update.c @@ -35,7 +35,7 @@ #include "config.h" -// TODO: Make these ifdefs better +// DECOMP_DO: Make these ifdefs better const char *credits01[] = { "1GAME DIRECTOR", "SHIGERU MIYAMOTO" }; const char *credits02[] = { "2ASSISTANT DIRECTORS", "YOSHIAKI KOIZUMI", "TAKASHI TEZUKA" }; const char *credits03[] = { "2SYSTEM PROGRAMMERS", "YASUNARI NISHIDA", "YOSHINORI TANIMOTO" }; diff --git a/src/game/mario_actions_cutscene.c b/src/game/mario_actions_cutscene.c index e863759fb0..d0f9892123 100644 --- a/src/game/mario_actions_cutscene.c +++ b/src/game/mario_actions_cutscene.c @@ -575,7 +575,7 @@ s32 act_debug_free_move(struct MarioState *m) { pos[2] += speed * coss(m->intendedYaw); } - // TODO: Add ability to ignore collision + // HACKERSM64_DO: Add ability to ignore collision // - spawn pseudo floor object to prevent OOB death resolve_and_return_wall_collisions(pos, 60.0f, 50.0f, &wallData); @@ -617,7 +617,7 @@ void general_star_dance_handler(struct MarioState *m, s32 isInWater) { } #endif disable_background_sound(); - //! TODO: Is this check necessary? Both seem to do the exact same thing. + //! HACKERSM64_DO: Is this check necessary? Both seem to do the exact same thing. if (m->actionArg & 1) { // No exit play_course_clear(obj_has_model(celebStar, MODEL_BOWSER_KEY)); diff --git a/src/game/mario_actions_stationary.c b/src/game/mario_actions_stationary.c index b0692e54aa..c5c53eae27 100644 --- a/src/game/mario_actions_stationary.c +++ b/src/game/mario_actions_stationary.c @@ -102,7 +102,7 @@ s32 check_common_hold_idle_cancels(struct MarioState *m) { return FALSE; } -//! TODO: actionArg names +//! HACKERSM64_DO: actionArg names s32 act_idle(struct MarioState *m) { if (m->quicksandDepth > 30.0f) { return set_mario_action(m, ACT_IN_QUICKSAND, 0); diff --git a/src/game/mario_misc.c b/src/game/mario_misc.c index b6fa44b1c7..9f35b22d6c 100644 --- a/src/game/mario_misc.c +++ b/src/game/mario_misc.c @@ -596,7 +596,7 @@ Gfx *geo_render_mirror_mario(s32 callContext, struct GraphNode *node, UNUSED Mat break; case GEO_CONTEXT_RENDER: if (mario->header.gfx.pos[0] > 1700.0f) { - // TODO: Is this a geo layout copy or a graph node copy? + // DECOMP_DO: Is this a geo layout copy or a graph node copy? gMirrorMario.sharedChild = mario->header.gfx.sharedChild; gMirrorMario.areaIndex = mario->header.gfx.areaIndex; vec3s_copy(gMirrorMario.angle, mario->header.gfx.angle); diff --git a/src/game/mario_step.c b/src/game/mario_step.c index 9b43b9cae7..28917ee657 100644 --- a/src/game/mario_step.c +++ b/src/game/mario_step.c @@ -315,7 +315,7 @@ static s32 perform_ground_quarter_step(struct MarioState *m, Vec3f nextPos) { vec3f_set(m->pos, nextPos[0], floorHeight, nextPos[2]); - // H64 TODO: Add config opt & check if floor is slippery + // HACKERSM64_DO: Add config opt & check if floor is slippery if (!SURFACE_IS_UNSAFE(floor->type)) { vec3f_copy(m->lastSafePos, m->pos); } @@ -407,7 +407,7 @@ struct Surface *check_ledge_grab(struct MarioState *m, struct Surface *prevWall, || (*ledgeFloor) == NULL || ledgePos[1] < nextPos[1] + 100.0f #ifdef DONT_LEDGE_GRAB_STEEP_SLOPES - || (*ledgeFloor)->normal.y < COS25 // H64 TODO: check if floor is actually slippery + || (*ledgeFloor)->normal.y < COS25 // HACKERSM64_DO: check if floor is actually slippery #endif ) { return NULL; diff --git a/src/game/obj_behaviors_2.c b/src/game/obj_behaviors_2.c index eacaceaf93..d0db06786e 100644 --- a/src/game/obj_behaviors_2.c +++ b/src/game/obj_behaviors_2.c @@ -46,7 +46,7 @@ #include "seq_ids.h" #include "spawn_sound.h" -//! TODO: remove static +//! HACKERSM64_DO: remove static enum ObjPositionOperation { POS_OP_SAVE_POSITION, @@ -748,25 +748,25 @@ static void treat_far_home_as_mario(f32 threshold) { } } -#include "behaviors/koopa.inc.c" // TODO: Text arg field name +#include "behaviors/koopa.inc.c" // DECOMP_DO: Text arg field name #include "behaviors/pokey.inc.c" #include "behaviors/swoop.inc.c" #include "behaviors/fly_guy.inc.c" #include "behaviors/goomba.inc.c" -#include "behaviors/chain_chomp.inc.c" // TODO: chain_chomp_sub_act_lunge documentation -#include "behaviors/wiggler.inc.c" // TODO +#include "behaviors/chain_chomp.inc.c" // DECOMP_DO: chain_chomp_sub_act_lunge documentation +#include "behaviors/wiggler.inc.c" // DECOMP_DO #include "behaviors/spiny.inc.c" -#include "behaviors/enemy_lakitu.inc.c" // TODO +#include "behaviors/enemy_lakitu.inc.c" // DECOMP_DO #include "behaviors/cloud.inc.c" -#include "behaviors/camera_lakitu.inc.c" // TODO: 104 label, follow cam documentation -#include "behaviors/monty_mole.inc.c" // TODO +#include "behaviors/camera_lakitu.inc.c" // DECOMP_DO: 104 label, follow cam documentation +#include "behaviors/monty_mole.inc.c" // DECOMP_DO #include "behaviors/platform_on_track.inc.c" #include "behaviors/seesaw_platform.inc.c" #include "behaviors/ferris_wheel.inc.c" -#include "behaviors/water_bomb.inc.c" // TODO: Shadow position +#include "behaviors/water_bomb.inc.c" // DECOMP_DO: Shadow position #include "behaviors/ttc_rotating_solid.inc.c" #include "behaviors/ttc_pendulum.inc.c" -#include "behaviors/ttc_treadmill.inc.c" // TODO +#include "behaviors/ttc_treadmill.inc.c" // DECOMP_DO #include "behaviors/ttc_moving_bar.inc.c" #include "behaviors/ttc_cog.inc.c" #include "behaviors/ttc_pit_block.inc.c" diff --git a/src/game/object_helpers.c b/src/game/object_helpers.c index a98fac0b5a..a520906367 100644 --- a/src/game/object_helpers.c +++ b/src/game/object_helpers.c @@ -31,7 +31,7 @@ static s32 clear_move_flag(u32 *bitSet, s32 flag); Gfx *geo_update_projectile_pos_from_parent(s32 callContext, UNUSED struct GraphNode *node, Mat4 mtx) { if (callContext == GEO_CONTEXT_RENDER) { - struct Object *projObj = (struct Object *) gCurGraphNodeObject; // TODO: change global type to Object pointer + struct Object *projObj = (struct Object *) gCurGraphNodeObject; // DECOMP_DO: change global type to Object pointer if (projObj->prevObj) { obj_update_pos_from_parent_transformation(mtx, projObj->prevObj); obj_set_gfx_pos_from_pos(projObj->prevObj); @@ -44,7 +44,7 @@ Gfx *geo_update_layer_transparency(s32 callContext, struct GraphNode *node, UNUS Gfx *dlStart = NULL; if (callContext == GEO_CONTEXT_RENDER) { - struct Object *objectGraphNode = (struct Object *) gCurGraphNodeObject; // TODO: change this to object pointer? + struct Object *objectGraphNode = (struct Object *) gCurGraphNodeObject; // DECOMP_DO: change this to object pointer? struct GraphNodeGenerated *currentGraphNode = (struct GraphNodeGenerated *) node; s32 parameter = currentGraphNode->parameter; diff --git a/src/game/save_file.h b/src/game/save_file.h index 146685946f..f2156d1db2 100644 --- a/src/game/save_file.h +++ b/src/game/save_file.h @@ -151,7 +151,7 @@ enum StarFlags { // Variable for setting a warp checkpoint. -// possibly a WarpDest struct where arg is a union. TODO: Check? +// possibly a WarpDest struct where arg is a union. DECOMP_DO: Check? struct WarpCheckpoint { /*0x00*/ u8 actNum; /*0x01*/ u8 courseNum; diff --git a/src/game/shadow.c b/src/game/shadow.c index 001b01914e..b40abf7233 100644 --- a/src/game/shadow.c +++ b/src/game/shadow.c @@ -179,7 +179,7 @@ static void add_shadow_to_display_list(Gfx *displayListHead, s8 shadowType) { gSPEndDisplayList(displayListHead); } -//! TODO: +//! HACKERSM64_DO: // - Breakout create_shadow_below_xyz into multiple functions /** * Create a shadow at the absolute position given, with the given parameters. diff --git a/src/goddard/debug_utils.c b/src/goddard/debug_utils.c index 7d12091e54..e7db4fa840 100644 --- a/src/goddard/debug_utils.c +++ b/src/goddard/debug_utils.c @@ -519,7 +519,7 @@ void imout(void) { /** * Returns a random floating point number between 0 and 1 (inclusive) - * TODO: figure out type of rng generator? + * DECOMP_DO: figure out type of rng generator? */ f32 gd_rand_float(void) { u32 temp; diff --git a/src/goddard/draw_objects.h b/src/goddard/draw_objects.h index 10051de79e..2c611c3f75 100644 --- a/src/goddard/draw_objects.h +++ b/src/goddard/draw_objects.h @@ -6,7 +6,7 @@ #include "gd_types.h" #include "macros.h" -// TODO: make this an enum without causing bss reordering +// DECOMP_DO: make this an enum without causing bss reordering #define COLOUR_BLACK 0 #define COLOUR_WHITE 1 #define COLOUR_RED 2 diff --git a/src/goddard/dynlist_proc.c b/src/goddard/dynlist_proc.c index 89bf249d99..923067091c 100644 --- a/src/goddard/dynlist_proc.c +++ b/src/goddard/dynlist_proc.c @@ -2676,7 +2676,7 @@ void d_set_id(s32 id) { } } -// TODO: enumerate colors? +// DECOMP_DO: enumerate colors? /** * Set the colour of the current dynamic object. The input color is an index * for `gd_get_colour()` @@ -2967,7 +2967,7 @@ Mat4f *d_get_rot_mtx_ptr(void) { /** * Copy `src` into the matrix of the current dynamic object. - * TODO: What is an IMatrix? + * DECOMP_DO: What is an IMatrix? */ void d_set_i_matrix(Mat4f *src) { struct GdObj *dynobj; @@ -3025,7 +3025,7 @@ Mat4f *d_get_matrix_ptr(void) { /** * Get a pointer to the current dynamic object's matrix. - * TODO: What is an IMatrix? + * DECOMP_DO: What is an IMatrix? */ Mat4f *d_get_i_mtx_ptr(void) { struct GdObj *dynobj; // sp24 diff --git a/src/goddard/dynlists/dynlist_macros.h b/src/goddard/dynlists/dynlist_macros.h index decb8fa96c..bfcfbab13c 100644 --- a/src/goddard/dynlists/dynlist_macros.h +++ b/src/goddard/dynlists/dynlist_macros.h @@ -211,7 +211,7 @@ #define SetCenterOfGravity(x, y, z) \ { 27, {0}, {0}, {(x), (y), (z)} } -// TODO: +// DECOMP_DO: /* Link Object ID to the current dynobj */ /* Supported Objs: groups, bones, faces, cameras, views, labels, animators */ diff --git a/src/goddard/gd_types.h b/src/goddard/gd_types.h index cff1fff63c..84fb881f11 100644 --- a/src/goddard/gd_types.h +++ b/src/goddard/gd_types.h @@ -604,7 +604,7 @@ struct ObjValPtr { /* 0x14 */ struct GdObj *obj; // maybe just a void *? /* 0x18 */ uintptr_t offset; // value pointed to is `obj` + `offset` /* 0x1C */ enum ValPtrType datatype; - /* 0x20 */ s32 flag; // TODO: better name for this? If 0x40000, then `offset` is an offset to a field in `obj`. Otherwise, `obj` is NULL, and `offset` is the address of a variable. + /* 0x20 */ s32 flag; // DECOMP_DO: better name for this? If 0x40000, then `offset` is an offset to a field in `obj`. Otherwise, `obj` is NULL, and `offset` is the address of a variable. }; /* sizeof = 0x24 */ enum GdLightFlags { diff --git a/src/goddard/renderer.c b/src/goddard/renderer.c index 90d9580797..f690f57132 100644 --- a/src/goddard/renderer.c +++ b/src/goddard/renderer.c @@ -757,7 +757,7 @@ void func_801A3370(f32, f32, f32); void gd_put_sprite(u16 *, s32, s32, s32, s32); void reset_cur_dl_indices(void); -// TODO: make a gddl_num_t? +// DECOMP_DO: make a gddl_num_t? u32 get_alloc_mem_amt(void) { return sAllocMemory; @@ -1149,7 +1149,7 @@ void Unknown8019C288(s32 stickX, s32 stickY) { /* 24AAA8 -> 24AAE0; orig name: func_8019C2D8 */ void gd_add_to_heap(void *addr, u32 size) { - // TODO: is this `1` for permanence special? + // DECOMP_DO: is this `1` for permanence special? gd_add_mem_to_heap(size, addr, 1); } diff --git a/src/goddard/shape_helper.c b/src/goddard/shape_helper.c index 0527cace97..5bec0c72f3 100644 --- a/src/goddard/shape_helper.c +++ b/src/goddard/shape_helper.c @@ -1199,7 +1199,7 @@ void animate_mario_head_gameover(struct ObjAnimator *self) { * Controls the normal animation of Mario's head. This functions like a state machine. */ void animate_mario_head_normal(struct ObjAnimator *self) { - s32 state = 0; // TODO: label these states + s32 state = 0; // DECOMP_DO: label these states s32 aBtnPressed = gGdCtrl.dragging; switch (self->state) { diff --git a/src/goddard/skin.c b/src/goddard/skin.c index 8088dc5086..d6e7ff08a9 100644 --- a/src/goddard/skin.c +++ b/src/goddard/skin.c @@ -95,7 +95,7 @@ void func_801922FC(struct ObjNet *net) { UNUSED u8 filler[8]; gGdSkinNet = net; - // TODO: netype constants? + // DECOMP_DO: netype constants? if (net->netType == 4) { if (net->shapePtr != NULL) { D_801B9E38 = &net->mat128; diff --git a/src/goddard/skin_movement.c b/src/goddard/skin_movement.c index 05cb7e3153..e9cf0e61e5 100644 --- a/src/goddard/skin_movement.c +++ b/src/goddard/skin_movement.c @@ -11,7 +11,7 @@ /* bss */ struct ObjWeight *sResetCurWeight; -static Mat4f D_801B9EA8; // TODO: rename to sHead2Mtx? +static Mat4f D_801B9EA8; // DECOMP_DO: rename to sHead2Mtx? static struct ObjJoint *D_801B9EE8; // set but not used /* @ 22FDB0 for 0x180 */ @@ -45,7 +45,7 @@ void func_801815E0(Mat4f *mtx) { /* @ 22FF30 for 0xDC */ /* called with ObjNext->unk1A8 (variable obj ptr?) ->unk20 or ->unk24 ptr*/ -// TODO: figure out the proper object type for a0 +// DECOMP_DO: figure out the proper object type for a0 void scale_verts(struct ObjGroup *a0) { register f32 sp1C; register struct ListNode *link; diff --git a/src/menu/intro_geo.c b/src/menu/intro_geo.c index 2b616f848a..f6c4616a0e 100644 --- a/src/menu/intro_geo.c +++ b/src/menu/intro_geo.c @@ -26,7 +26,7 @@ enum IntroBackgroundTypes { struct GraphNodeMore { /*0x00*/ struct GraphNode node; - /*0x14*/ void *todo; + /*0x14*/ void *unk14; /*0x18*/ u32 bgTableID; }; @@ -183,7 +183,7 @@ static s8 *introBackgroundTables[] = { introBackgroundIndexTable }; */ Gfx *geo_intro_regular_backdrop(s32 callContext, struct GraphNode *node, UNUSED void *context) { struct GraphNodeMore *graphNode = (struct GraphNodeMore *) node; - s32 index = graphNode->bgTableID & 0xff; // TODO: word at offset 0x18 of struct GraphNode (always ends up being 0) + s32 index = graphNode->bgTableID & 0xff; // DECOMP_DO: word at offset 0x18 of struct GraphNode (always ends up being 0) s8 *backgroundTable = introBackgroundTables[index]; Gfx *dl = NULL; Gfx *dlIter = NULL; diff --git a/src/s2d_engine/s2d_buffer.c b/src/s2d_engine/s2d_buffer.c index 1d07f48019..2a538affb6 100644 --- a/src/s2d_engine/s2d_buffer.c +++ b/src/s2d_engine/s2d_buffer.c @@ -16,7 +16,7 @@ void s2d_reset_defer_index(void) { s2d_charBuffer_index = 0; } -// TODO: these DO NOT work +// HACKERSM64_DO: these DO NOT work // pls debug :) void s2d_print_deferred(int x, int y, const char *str) { s2d_charBuffer[s2d_charBuffer_index] = (char *) str; diff --git a/src/s2d_engine/s2d_parse.c b/src/s2d_engine/s2d_parse.c index 674ce7c1f1..43a0c859d7 100644 --- a/src/s2d_engine/s2d_parse.c +++ b/src/s2d_engine/s2d_parse.c @@ -94,7 +94,7 @@ static int s2d_snprint(int x, int y, int align, const char *str, uObjMtx *buf, i drop_shadow = 1; // WIP: drop shadow custom offset - // TODO: unique offset per string; fix negative offsets + // HACKERSM64_DO: unique offset per string; fix negative offsets CH_SKIP(p); drop_x = s2d_atoi(p, &p); CH_SKIP(p); CH_SKIP(p); diff --git a/src/s2d_engine/s2d_print.h b/src/s2d_engine/s2d_print.h index fb59f2286e..18a0c9ba59 100644 --- a/src/s2d_engine/s2d_print.h +++ b/src/s2d_engine/s2d_print.h @@ -2,7 +2,7 @@ #include #define SCALE "\x80" // SCALE (an integer percentage; 100 -> 100%, 25 -> 25%, etc.) -#define ROTATE "\x81" // ROTATE (degrees) // TODO: maybe add axis? +#define ROTATE "\x81" // ROTATE (degrees) // HACKERSM64_DO: maybe add axis? #define TRANSLATE "\x82" // TRANSLATE (x) (y) #define COLOR "\x83" // COLOR (r) (g) (b) (a) #define DROPSHADOW "\x84" // DROPSHADOW (no args) diff --git a/tools/FlipsSrc/Flips.cpp b/tools/FlipsSrc/Flips.cpp index 6635fb882b..d3a8ce46ea 100755 --- a/tools/FlipsSrc/Flips.cpp +++ b/tools/FlipsSrc/Flips.cpp @@ -20,7 +20,7 @@ extern "C" void __cxa_pure_virtual() { abort(); } #endif #endif -//TODO: source ROM chooser +//FLIPS_DO: source ROM chooser //given a target, from all known source ROMs with same extension, find the most similar // read 1MB from each; check how many bytes are same and same location as target // (only counting offsets where both source and target bytes are different from previous, to avoid false positives on long runs of 00) @@ -31,7 +31,7 @@ extern "C" void __cxa_pure_virtual() { abort(); } // fail //this goes on a separate thread -//TODO: more manual GUI +//FLIPS_DO: more manual GUI // has three text fields, for patch / source / target, and 'pick' buttons nearby that open file dialogs // also Create / Apply / ApplyRun buttons at the bottom //auto selection (only if target field is blank): @@ -51,7 +51,7 @@ extern "C" void __cxa_pure_virtual() { abort(); } // if first file isn't found, it tries using the entire field as filename, in case it actually contains semicolon -//TODO: delete +//FLIPS_DO: delete struct mem ReadWholeFile(LPCWSTR filename) { return file::read(filename); @@ -1165,7 +1165,7 @@ void usage() " with --verbose, disassemble the entire patch\n" //" also estimates how much of the source file is retained\n" //" anything under 400 is fine, anything over 600 should be treated with suspicion\n" - //(TODO: --info --verbose) + //(FLIPS_DO: --info --verbose) "-i --ips, -b -B --bps --bps-delta, --bps-delta-moremem, --bps-linear:\n" " create this patch format instead of guessing based on file extension\n" " ignored when applying\n" diff --git a/tools/FlipsSrc/Flips.h b/tools/FlipsSrc/Flips.h index 8154e6b0d8..2ea150446b 100644 --- a/tools/FlipsSrc/Flips.h +++ b/tools/FlipsSrc/Flips.h @@ -266,7 +266,7 @@ class config }; extern config cfg; -//TODO: rewrite these +//FLIPS_DO: rewrite these struct mem GetRomList(); void SetRomList(struct mem data); LPCWSTR FindRomForPatch(file* patch, bool * possibleToFind); @@ -303,7 +303,7 @@ void usage();//does not return //provided by the OS port //several functions of file:: and filewrite:: also belong to the OS port -//TODO: delete +//FLIPS_DO: delete struct mem ReadWholeFile(LPCWSTR filename); bool WriteWholeFile(LPCWSTR filename, struct mem data); bool WriteWholeFileWithHeader(LPCWSTR filename, struct mem header, struct mem data); @@ -436,7 +436,7 @@ enum bpserror bps_apply(struct mem patch, struct mem in, struct mem * out, struc // {NULL,0} as metadata. enum bpserror bps_create_linear(struct mem source, struct mem target, struct mem metadata, struct mem * patch); -#ifdef __cplusplus // TODO: make this functionality available from C and C-ABI-only languages +#ifdef __cplusplus // FLIPS_DO: make this functionality available from C and C-ABI-only languages //Very similar to bps_create_linear; the difference is that this one takes longer to run, but // generates smaller patches. //Because it can take much longer, a progress meter is supplied; total is guaranteed to be constant diff --git a/tools/armips.cpp b/tools/armips.cpp index f35fd27d15..bac714af54 100644 --- a/tools/armips.cpp +++ b/tools/armips.cpp @@ -3928,7 +3928,7 @@ void CMipsInstruction::encodeNormal() const encoding |= immediateData.primary.value; break; default: - // TODO: Assert? + // ARMIPS_DO: Assert? break; } @@ -3945,7 +3945,7 @@ void CMipsInstruction::encodeNormal() const encoding |= immediateData.secondary.value << 18; break; default: - // TODO: Assert? + // ARMIPS_DO: Assert? break; } @@ -3984,7 +3984,7 @@ void CMipsInstruction::encodeVfpu() const encoding |= immediateData.primary.value << 0; break; default: - // TODO: Assert? + // ARMIPS_DO: Assert? break; } @@ -4365,7 +4365,7 @@ bool MipsElfFile::write(void* data, size_t length) if (section != -1) { - // TODO: segmentless sections + // ARMIPS_DO: segmentless sections return false; } @@ -6316,7 +6316,7 @@ const tMipsOpcode MipsOpcodes[] = { { "vnsin.S", "vd,vs", MIPS_VFPU4_11(0x1a), MA_PSP, MO_VFPU }, { "vrexp2.S", "vd,vs", MIPS_VFPU4_11(0x1c), MA_PSP, MO_VFPU }, -// VFPU4 1.2: TODO: Unsure where vsBZ goes, no one uses it. +// VFPU4 1.2: ARMIPS_DO: Unsure where vsBZ goes, no one uses it. // 31-------------21-------16--------------------------------------0 // |= VF4-1.2 | rt | | // --------11----------5-------------------------------------------- @@ -6330,10 +6330,10 @@ const tMipsOpcode MipsOpcodes[] = { { "vrndi.S", "vd", MIPS_VFPU4_12(0x01), MA_PSP, MO_VFPU }, { "vrndf1.S", "vd", MIPS_VFPU4_12(0x02), MA_PSP, MO_VFPU }, { "vrndf2.S", "vd", MIPS_VFPU4_12(0x03), MA_PSP, MO_VFPU }, - // TODO: vsBZ? + // ARMIPS_DO: vsBZ? { "vf2h.S", "vd,vs", MIPS_VFPU4_12(0x12), MA_PSP, MO_VFPU }, { "vh2f.S", "vd,vs", MIPS_VFPU4_12(0x13), MA_PSP, MO_VFPU }, - // TODO: vsBZ? + // ARMIPS_DO: vsBZ? { "vlgb.S", "vd,vs", MIPS_VFPU4_12(0x17), MA_PSP, MO_VFPU }, { "vuc2i.S", "vd,vs", MIPS_VFPU4_12(0x18), MA_PSP, MO_VFPU }, { "vc2i.S", "vd,vs", MIPS_VFPU4_12(0x19), MA_PSP, MO_VFPU }, @@ -8438,7 +8438,7 @@ void MipsOpcodeFormatter::handleOpcodeName(const MipsOpcodeData& opData) buffer += "sptq"[opData.vfpuSize]; break; case 'B': - // TODO + // ARMIPS_DO break; default: buffer += *(encoding-1); @@ -8537,7 +8537,7 @@ void MipsOpcodeFormatter::handleOpcodeParameters(const MipsOpcodeData& opData, c break; case 'C': // vfpu condition case 'W': // vfpu argument - // TODO + // ARMIPS_DO break; case 'w': // 'wb' characters buffer += L"wb"; @@ -9174,7 +9174,7 @@ void ArchitectureCommand::writeTempData(TempData& tempData) const void ArchitectureCommand::writeSymData(SymbolData& symData) const { - // TODO: find a less ugly way to check for undefined memory positions + // ARMIPS_DO: find a less ugly way to check for undefined memory positions if (position == -1) return; @@ -9354,7 +9354,7 @@ void CAssemblerLabel::writeTempData(TempData& tempData) const void CAssemblerLabel::writeSymData(SymbolData& symData) const { - // TODO: find a less ugly way to check for undefined memory positions + // ARMIPS_DO: find a less ugly way to check for undefined memory positions if (label->getValue() == -1 || Global.symbolTable.isGeneratedLabel(label->getName())) return; @@ -10114,7 +10114,7 @@ void CDirectiveData::Encode() const } break; case EncodingMode::Invalid: - // TODO: Assert? + // ARMIPS_DO: Assert? break; } } @@ -10172,7 +10172,7 @@ void CDirectiveData::writeTempData(TempData& tempData) const } break; case EncodingMode::Invalid: - // TODO: Assert? + // ARMIPS_DO: Assert? break; } @@ -10205,7 +10205,7 @@ void CDirectiveData::writeSymData(SymbolData& symData) const symData.addData(position,getDataSize(),SymbolData::Data64); break; case EncodingMode::Invalid: - // TODO: Assert? + // ARMIPS_DO: Assert? break; } } @@ -10298,7 +10298,7 @@ void CDirectiveFile::Encode() const g_fileManager->closeFile(); break; case Type::Invalid: - // TODO: Assert? + // ARMIPS_DO: Assert? break; } } @@ -10323,7 +10323,7 @@ void CDirectiveFile::writeTempData(TempData& tempData) const str = L".close"; break; case Type::Invalid: - // TODO: Assert? + // ARMIPS_DO: Assert? break; } @@ -10344,7 +10344,7 @@ void CDirectiveFile::writeSymData(SymbolData& symData) const closeFile->endSymData(symData); break; case Type::Invalid: - // TODO: Assert? + // ARMIPS_DO: Assert? break; } } @@ -19808,7 +19808,7 @@ bool SymbolTable::findEquation(const std::wstring& name, int file, int section, return true; } -// TODO: better +// ARMIPS_DO: better std::wstring SymbolTable::getUniqueLabelName(bool local) { std::wstring name = formatString(L"__armips_label_%08x__",uniqueCount++); diff --git a/tools/lz4tpack.c b/tools/lz4tpack.c index 70488214b4..855c38c7bb 100644 --- a/tools/lz4tpack.c +++ b/tools/lz4tpack.c @@ -434,7 +434,7 @@ static int LZ4T_unpack_size(struct SizedBuffer* in, int* _giganticCounts) #undef giganticCounts } -// TODO: Take in compressedSize +// HACKERSM64_DO: Take in compressedSize // !!! Make sure to avoid all LZ4 constants, it should be all packed in the header static char* LZ4T_unpack(struct SizedBuffer in) { diff --git a/tools/n64graphics.c b/tools/n64graphics.c index c0014d0ccc..51e6ee0916 100644 --- a/tools/n64graphics.c +++ b/tools/n64graphics.c @@ -196,7 +196,7 @@ ia *raw2i(const uint8_t *raw, int width, int height, int depth) } img[i].intensity = SCALE_4_8(bits); img[i].alpha = img[i].intensity; // alpha copy intensity - // TODO: modes + // DECOMP_DO: modes // img[i].alpha = 0xFF; // alpha = 1 // img[i].alpha = img[i].intensity ? 0xFF : 0x00; // binary } diff --git a/tools/stb/stb_image.h b/tools/stb/stb_image.h index d9c21bc813..136c937091 100644 --- a/tools/stb/stb_image.h +++ b/tools/stb/stb_image.h @@ -1096,7 +1096,7 @@ static unsigned char *stbi__load_and_postprocess_8bit(stbi__context *s, int *x, ri.bits_per_channel = 8; } - // @TODO: move stbi__convert_format to here + // @STB_DO: move stbi__convert_format to here if (stbi__vertically_flip_on_load) { int channels = req_comp ? req_comp : *comp; @@ -1120,8 +1120,8 @@ static stbi__uint16 *stbi__load_and_postprocess_16bit(stbi__context *s, int *x, ri.bits_per_channel = 16; } - // @TODO: move stbi__convert_format16 to here - // @TODO: special case RGB-to-Y (and RGBA-to-YA) for 8-bit-to-16-bit case to keep more precision + // @STB_DO: move stbi__convert_format16 to here + // @STB_DO: special case RGB-to-Y (and RGBA-to-YA) for 8-bit-to-16-bit case to keep more precision if (stbi__vertically_flip_on_load) { int channels = req_comp ? req_comp : *comp; @@ -1743,7 +1743,7 @@ typedef struct int rgb; int scan_n, order[4]; - int restart_interval, todo; + int restart_interval, to_do; // kernels void (*idct_block_kernel)(stbi_uc *out, int out_stride, short data[64]); @@ -2677,7 +2677,7 @@ static void stbi__jpeg_reset(stbi__jpeg *j) j->nomore = 0; j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0; j->marker = STBI__MARKER_none; - j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff; + j->to_do = j->restart_interval ? j->restart_interval : 0x7fffffff; j->eob_run = 0; // no more than 1<<31 MCUs if no restart_interal? that's plenty safe, // since we don't even allow 1<<30 pixels @@ -2703,7 +2703,7 @@ static int stbi__parse_entropy_coded_data(stbi__jpeg *z) if (!stbi__jpeg_decode_block(z, data, z->huff_dc+z->img_comp[n].hd, z->huff_ac+ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*j*8+i*8, z->img_comp[n].w2, data); // every data block is an MCU, so countdown the restart interval - if (--z->todo <= 0) { + if (--z->to_do <= 0) { if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); // if it's NOT a restart, then just bail, so we get corrupt data // rather than no data @@ -2735,7 +2735,7 @@ static int stbi__parse_entropy_coded_data(stbi__jpeg *z) } // after all interleaved components, that's an interleaved MCU, // so now count down the restart interval - if (--z->todo <= 0) { + if (--z->to_do <= 0) { if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); if (!STBI__RESTART(z->marker)) return 1; stbi__jpeg_reset(z); @@ -2766,7 +2766,7 @@ static int stbi__parse_entropy_coded_data(stbi__jpeg *z) return 0; } // every data block is an MCU, so countdown the restart interval - if (--z->todo <= 0) { + if (--z->to_do <= 0) { if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); if (!STBI__RESTART(z->marker)) return 1; stbi__jpeg_reset(z); @@ -2795,7 +2795,7 @@ static int stbi__parse_entropy_coded_data(stbi__jpeg *z) } // after all interleaved components, that's an interleaved MCU, // so now count down the restart interval - if (--z->todo <= 0) { + if (--z->to_do <= 0) { if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); if (!STBI__RESTART(z->marker)) return 1; stbi__jpeg_reset(z); diff --git a/tools/textconv.c b/tools/textconv.c index 867a944a3e..666f4e552c 100644 --- a/tools/textconv.c +++ b/tools/textconv.c @@ -14,7 +14,7 @@ struct CharmapEntry { uint32_t unicode[3]; - int length; // length of the unicode array. TODO: use dynamic memory allocation + int length; // length of the unicode array. DECOMP_DO: use dynamic memory allocation int bytesCount; uint8_t bytes[2]; // bytes to convert unicode array to, (e.g. 'A' = 0x0A) }; @@ -211,7 +211,7 @@ static void read_charmap(const char *filename) } else if(len == ARRAY_COUNT(entry.unicode)) { - // TODO: Use dynamic memory allocation so this is unnecessary. + // DECOMP_DO: Use dynamic memory allocation so this is unnecessary. parse_error(filename, lineNum, "string limit exceeded"); } else if (*line == '\\')