summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcoco875 <59367621+coco875@users.noreply.github.com>2024-01-01 03:56:14 +0100
committerGitHub <noreply@github.com>2023-12-31 19:56:14 -0700
commit98474c5b94e453fcee4d332657e45b2f626c62a3 (patch)
treef68be5a0abfb02c0dbd25d6297c67f041ca18598 /src
parent2727a5e5ddc3bc439b2d0b7f2e681650b79b2fb5 (diff)
fix todo, bug not appears and change theme (#525)
* fix todo, bug not appears and change theme * fix warning
Diffstat (limited to 'src')
-rw-r--r--src/audio/data.c4
-rw-r--r--src/audio/internal.h4
-rw-r--r--src/audio/load.c10
-rw-r--r--src/audio/port_eu.c2
-rw-r--r--src/audio/seqplayer.c8
-rw-r--r--src/camera.h12
-rw-r--r--src/code_800029B0.c4
-rw-r--r--src/code_80005FD0.c6
-rw-r--r--src/code_80057C60.c2
-rw-r--r--src/code_80071F00.c8
-rw-r--r--src/code_80086E70.c2
-rw-r--r--src/code_80091750.c10
-rw-r--r--src/crash_screen.c2
-rw-r--r--src/data/common_textures.inc.c4
-rw-r--r--src/data/data_segment2.inc.c2
-rw-r--r--src/ending/ceremony_and_credits.c6
-rw-r--r--src/ending/ceremony_data.inc.c2
-rw-r--r--src/ending/code_80281780.c4
-rw-r--r--src/ending/podium_ceremony_actors.c4
-rw-r--r--src/hud_renderer.c6
-rw-r--r--src/main.c8
-rw-r--r--src/main.h4
-rw-r--r--src/os/contpfs.c15
-rw-r--r--src/os/leointerrupt.c2
-rw-r--r--src/os/math/cosf.c2
-rw-r--r--src/os/math/sinf.c2
-rw-r--r--src/os/osContInit.c3
-rw-r--r--src/os/osCreatePiManager.c3
-rw-r--r--src/os/osEPiRawStartDma.c6
-rw-r--r--src/os/osEepromProbe.c2
-rw-r--r--src/os/osPfsDeleteFile.c6
-rw-r--r--src/os/osPiRawStartDma.c3
-rw-r--r--src/os/osPiStartDma.c2
-rw-r--r--src/os/osViBlack.c2
-rw-r--r--src/os/osViSwapBuffer.c3
-rw-r--r--src/os/piint.h9
-rw-r--r--src/racing/actors.c2
-rw-r--r--src/racing/collision.c10
-rw-r--r--src/racing/math_util.c3
-rw-r--r--src/racing/race_logic.c2
-rw-r--r--src/racing/render_courses.c2
41 files changed, 110 insertions, 83 deletions
diff --git a/src/audio/data.c b/src/audio/data.c
index 1beb1378f..cc08fd832 100644
--- a/src/audio/data.c
+++ b/src/audio/data.c
@@ -213,7 +213,7 @@ s16 gUnknownWave7[256] = {
s16 *gWaveSamples[6] = { sSawtoothWaves, sTriangleWaves, sSineWaves, sSquareWaves, sUnknownWave6, gUnknownWave7 };
-// TODO: file boundary?
+//! @todo file boundary?
u32 fill[2] = {0x00000000, 0x00000000};
// Transforms a pitch scale factor in -127..127 into a frequency scale factor
@@ -343,7 +343,7 @@ struct AdsrEnvelope gDefaultEnvelope[] = {
{ BSWAP16(ADSR_HANG), 0 } // then continue staying there
};
-// TODO 0x00000000800f624c fill2
+//! @todo 0x00000000800f624c fill2
u32 fill2 = 0x00000000;
struct NoteSubEu gZeroNoteSub = { 0 };
diff --git a/src/audio/internal.h b/src/audio/internal.h
index a8b4da076..33665af01 100644
--- a/src/audio/internal.h
+++ b/src/audio/internal.h
@@ -38,7 +38,7 @@
#define TEMPO_SCALE TATUMS_PER_BEAT
-// TODO: US_FLOAT should probably be renamed to JP_DOUBLE since eu seems to use floats too
+//! @todo US_FLOAT should probably be renamed to JP_DOUBLE since eu seems to use floats too
#define US_FLOAT(x) x ## f
#define US_FLOAT2(x) x
@@ -440,7 +440,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.
+ //! @todo 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 0580d89c7..e71a0a66c 100644
--- a/src/audio/load.c
+++ b/src/audio/load.c
@@ -669,7 +669,7 @@ void preload_sequence(u32 seqId, u8 preloadMask) {
}
if (preloadMask & PRELOAD_SEQUENCE) {
- // @bug should be IS_SEQ_LOAD_COMPLETE
+ //! @bug should be IS_SEQ_LOAD_COMPLETE
if (IS_BANK_LOAD_COMPLETE(seqId) == TRUE) {
sequenceData = get_bank_or_seq(0, 2, seqId);
} else {
@@ -716,9 +716,11 @@ void load_sequence_internal(u32 player, u32 seqId, s32 loadAsync) {
if (bank_load_async(bankId, 2, seqPlayer) == NULL) {
return;
}
- // @bug This should set the last bank (i.e. the first in the JSON)
- // as default, not the missing one. This code path never gets
- // taken, though -- all sequence loading is synchronous.
+ /**
+ * @bug This should set the last bank (i.e. the first in the JSON)
+ * as default, not the missing one. This code path never gets
+ * taken, though -- all sequence loading is synchronous.
+ */
seqPlayer->defaultBank[0] = bankId;
} else {
if (load_banks_immediate(seqId, &seqPlayer->defaultBank[0]) == NULL) {
diff --git a/src/audio/port_eu.c b/src/audio/port_eu.c
index 6aee38579..7c1629696 100644
--- a/src/audio/port_eu.c
+++ b/src/audio/port_eu.c
@@ -255,7 +255,7 @@ void func_800CBBE8(u32 arg0, s8 arg1) {
func_800CBB48(arg0, &sp34);
}
-// TODO: clenanup, something's weird with the variables. D_800EA4A4 is probably EuAudioCmd bc of the + 0x100
+//! @todo clenanup, something's weird with the variables. D_800EA4A4 is probably EuAudioCmd bc of the + 0x100
void func_800CBC24(void)
{
s32 temp_t6;
diff --git a/src/audio/seqplayer.c b/src/audio/seqplayer.c
index c91fb67b1..5deae9765 100644
--- a/src/audio/seqplayer.c
+++ b/src/audio/seqplayer.c
@@ -1578,9 +1578,11 @@ void init_sequence_players(void) {
for (i = 0; i < ARRAY_COUNT(gSequenceChannels); i++) {
gSequenceChannels[i].seqPlayer = NULL;
gSequenceChannels[i].enabled = FALSE;
- // @bug Size of wrong array. Zeroes out second half of gSequenceChannels[0],
- // all of gSequenceChannels[1..31], and part of gSequenceLayers[0].
- // However, this is only called at startup, so it's harmless.
+ /**
+ * @bug Size of wrong array. Zeroes out second half of gSequenceChannels[0],
+ * all of gSequenceChannels[1..31], and part of gSequenceLayers[0].
+ * However, this is only called at startup, so it's harmless.
+ */
#ifdef AVOID_UB
#define LAYERS_SIZE LAYERS_MAX
#else
diff --git a/src/camera.h b/src/camera.h
index 7a2452dc7..fa0e01e5d 100644
--- a/src/camera.h
+++ b/src/camera.h
@@ -3,11 +3,13 @@
#include "common_structs.h"
-// todo put this define in types.h or similar.
-// Certain functions are marked as having return values, but do not
-// actually return a value. This causes undefined behavior, which we'd rather
-// avoid on modern GCC. This only impacts -O2 and can matter for both the function
-// itself and functions that call it.
+/**
+ * @todo put this define in types.h or similar.
+ * Certain functions are marked as having return values, but do not
+ * actually return a value. This causes undefined behavior, which we'd rather
+ * avoid on modern GCC. This only impacts -O2 and can matter for both the function
+ * itself and functions that call it.
+*/
#ifdef AVOID_UB
#define BAD_RETURN(cmd) void
#else
diff --git a/src/code_800029B0.c b/src/code_800029B0.c
index 9e42077bf..a1df47777 100644
--- a/src/code_800029B0.c
+++ b/src/code_800029B0.c
@@ -50,7 +50,7 @@ s32 D_800DC5E0 = 32;
// This is tracking which credit "state" we're in, decides which credits are shown (and probably other stuff)
u16 D_800DC5E4 = 0;
-// TODO: gPlayerWinningIndex (D_800DC5E8) accessed as word, D_800DC5EB as u8
+//! @todo gPlayerWinningIndex (D_800DC5E8) accessed as word, D_800DC5EB as u8
s32 gPlayerWinningIndex = 0;
struct UnkStruct_800DC5EC D_8015F480[4];
@@ -146,7 +146,7 @@ u16 gNumPermanentActors;
s32 code_800029B0_bss_pad2[44];
struct Actor gActorList[ACTOR_LIST_SIZE];
-// @warning todo: Is this apart of the actor array?
+//! @warning todo: Is this apart of the actor array?
UNUSED u8 D_80162578[sizeof(struct Actor)];
s16 gDebugPathCount;
diff --git a/src/code_80005FD0.c b/src/code_80005FD0.c
index fe2a0d40f..4fcc3dfd2 100644
--- a/src/code_80005FD0.c
+++ b/src/code_80005FD0.c
@@ -3562,7 +3562,7 @@ void func_8000F2DC(void) {
D_801645E0 = D_801645A0[0];
// zero allocated memory?
- // @warning does not appear to zero all the above allocated variables.
+ //! @warning does not appear to zero all the above allocated variables.
for (i = 0; i < 4; i++) {
func_8000F2BC(D_80164550[i], D_80163368[i]);
func_8000F2BC(D_80164560[i], D_80163368[i]);
@@ -3800,7 +3800,7 @@ void func_800100F0(s32 pathIndex) {
// If path data higher than 3000 something has gone wrong.
// Skip processing the data.
- // todo: Confirm this comment
+ //! @todo Confirm this comment
if (!bInvalidPath) {
var_v0 = func_80011014(pathDest, path, sp24, pathIndex);
gWaypointCountByPathIndex[pathIndex] = (u16) var_v0;
@@ -7124,7 +7124,7 @@ void func_8001969C(s32 playerId, f32 arg1, s32 cameraId, s16 pathIndex) {
waypoint = &D_80164550[0][gNearestWaypointByCameraId[cameraId]];
D_801645F8[cameraId] = waypoint->posX;
- // @bug Adding an (f32) cast changes asm, why?
+ //! @bug Adding an (f32) cast changes asm, why?
D_80164618[cameraId] = waypoint->posY + 10.0;
D_80164638[cameraId] = waypoint->posZ;
D_80164648[cameraId] = 0.0f;
diff --git a/src/code_80057C60.c b/src/code_80057C60.c
index 08c4f992d..8e22c912b 100644
--- a/src/code_80057C60.c
+++ b/src/code_80057C60.c
@@ -30,7 +30,7 @@
#include "spawn_players.h"
-// WARNING: this macro is undef'd at the end of this file
+//! @warning this macro is undef'd at the end of this file
#define MAKE_RGB(r,g,b) (((r) << 0x10) | ((g) << 0x08) | (b << 0x00))
s16 D_800E4730[] = {
diff --git a/src/code_80071F00.c b/src/code_80071F00.c
index 1ba8ecd89..f8c3a7784 100644
--- a/src/code_80071F00.c
+++ b/src/code_80071F00.c
@@ -34,7 +34,7 @@
#include "menus.h"
#include "data/other_textures.h"
-// TODO: unused?
+//! @todo unused?
f32 D_800E43B0[] = {
65536.0, 0.0, 1.0, 0.0,
0.0, 65536.0, 0.0, 1.0,
@@ -118,7 +118,7 @@ s32 find_unused_obj_index(s32* arg0) {
return temp_v1;
}
-// @warning Does not clear struct members.
+//! @warning Does not clear struct members.
void delete_object(s32 *objectIndex) {
func_80072428(*objectIndex);
gObjectList[*objectIndex].unk_0CA = 0;
@@ -1208,7 +1208,7 @@ void func_80074574(u8 *arg0, void *arg1, u16 arg2, u16 arg3) {
func_80074510((uintptr_t) &_other_texturesSegmentRomStart[SEGMENT_OFFSET(arg0)], arg1, arg2 * arg3);
}
-// todo: arg1 should likely be a u8 *
+//! @todo arg1 should likely be a u8 *
void func_800745C8(s32 objectIndex, s32 arg1) {
s32 phi_a1;
@@ -3629,7 +3629,7 @@ void consume_item(s32 playerId) {
}
}
-// todo: Cleanup this function to use array access and struct if possible.
+//! @todo Cleanup this function to use array access and struct if possible.
u8 gen_random_item(s16 rank, s16 isCpu)
{
u16 rand = random_int(100);
diff --git a/src/code_80086E70.c b/src/code_80086E70.c
index c005292f8..c27b50dca 100644
--- a/src/code_80086E70.c
+++ b/src/code_80086E70.c
@@ -1236,7 +1236,7 @@ s32 func_8008A060(s32 objectIndex, Camera *camera, u16 arg2) {
var_v1 = 0;
temp_t3 = (((u16)camera->rot[1] - gObjectList[objectIndex].unk_0BE[1]) + (arg2 >> 1));
- // @warning Always true
+ //! @warning Always true
if ((temp_t3 >= 0) && (arg2 >= temp_t3)) {
var_v1 = 1;
}
diff --git a/src/code_80091750.c b/src/code_80091750.c
index a405be0b8..d48544654 100644
--- a/src/code_80091750.c
+++ b/src/code_80091750.c
@@ -31,12 +31,14 @@
#include "racing/race_logic.h"
#include "ending/code_80281C40.h"
#include "spawn_players.h"
-// TODO: Move gGfxPool out of main.h
+//! @todo Move gGfxPool out of main.h
// Unfortunately that's not a small effort due to weird import structure in this project
#include "main.h"
-s16 D_8018E820; // todo: these are likely arrays.
-s16 D_8018E822; // todo: This may not be the right file for them.
+//! @todo these are likely arrays.
+s16 D_8018E820;
+//! @todo This may not be the right file for them.
+s16 D_8018E822;
s32 code_80091750_pad_1;
s16 D_8018E828;
s16 D_8018E82A;
@@ -1623,7 +1625,7 @@ void func_80091EE4(void) {
void func_80091FA4(void) {
s32 i;
- // todo: These sizes need to be sizeof() for shiftability if possible
+ //! @todo These sizes need to be sizeof() for shiftability if possible
D_8018D9B4 = (uintptr_t *) get_next_available_memory_addr(0x00002800);
D_8018D9B0 = get_next_available_memory_addr(0x000124F8);
D_8018D9B8 = (uintptr_t *) get_next_available_memory_addr(0x00001000);
diff --git a/src/crash_screen.c b/src/crash_screen.c
index 89164af80..d2225a297 100644
--- a/src/crash_screen.c
+++ b/src/crash_screen.c
@@ -162,7 +162,7 @@ void crash_screen_draw_info(u16 *framebuffer, OSThread *thread) {
faultedAddr = context->pc & (~3);
// Ensure the address to the faulted instruction is a memory address.
- // @bug if this check fails, the ra register is printed a second time.
+ //! @bug if this check fails, the ra register is printed a second time.
if ((faultedAddr > 0x80000000) && (faultedAddr < 0x803FFF7F)) {
// Cast the address to its value; the faulty machine code.
crashInfo = *(u32*)faultedAddr;
diff --git a/src/data/common_textures.inc.c b/src/data/common_textures.inc.c
index cc8df5c5d..161c38033 100644
--- a/src/data/common_textures.inc.c
+++ b/src/data/common_textures.inc.c
@@ -631,7 +631,7 @@ Gfx common_model_flat_banana[] = {
};
// tlut size 8x29
-// todo: What is this?
+//! @todo What is this?
s8 D_0D004C68[] = {
#include "assets/trees/gTLUTTreesImport.inc.c"
};
@@ -3011,7 +3011,7 @@ u8 gTLUTLakituCountdown[][512] = {
};
/**
- * todo: Generate tlut based on the actual texture.
+ * @todo Generate tlut based on the actual texture.
* The textures these tluts are for are not in common_textures.inc.c
* This applies to gTLUTLakituCheckeredFlag, gTLUTLakituSecondLap,
* gTLUTLakituFinalLap, gTLUTLakituReverse, gTLUTLakituFishing
diff --git a/src/data/data_segment2.inc.c b/src/data/data_segment2.inc.c
index 17cecbd86..7ce08d6e1 100644
--- a/src/data/data_segment2.inc.c
+++ b/src/data/data_segment2.inc.c
@@ -281,7 +281,7 @@ UNUSED Vtx D_02007B38[] = {
{{{ 0, 0, 0}, 0, { 0, 448}, {0xff, 0x00, 0x00, 0xff}}},
};
-// Todo: Place all these vertices in a single array
+//! @todo Place all these vertices in a single array
// Access the correct vertex using sym[value]
Vtx D_02007BB8[] = {
{{{ 0, 65520, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
diff --git a/src/ending/ceremony_and_credits.c b/src/ending/ceremony_and_credits.c
index da1ff74b7..d0c697dbd 100644
--- a/src/ending/ceremony_and_credits.c
+++ b/src/ending/ceremony_and_credits.c
@@ -377,7 +377,7 @@ dummy_label_888430: ;
}
}
-// todo: Cast to normal Camera? Or from CinematicCamera?
+//! @todo Cast to normal Camera? Or from CinematicCamera?
s32 func_80282D90(struct CinematicCamera *camera, struct struct_80286A04 *arg1, struct struct_80286A04 *arg2, s32 arg3) {
s32 res;
@@ -497,7 +497,7 @@ s32 func_80283330(s32 arg0) {
extern s32 D_802876D8;
-// todo: Does this match as a return of s8?
+//! @todo Does this match as a return of s8?
s32 func_8028336C(UNUSED struct CinematicCamera *arg0, UNUSED Camera *camera) {
u8 sp20[] = { 2, 3, 4, 5, 5, 5, 5, 5 };
if (D_802876D8 != 0)
@@ -1177,7 +1177,7 @@ void func_802846B4(struct CinematicCamera *camera) {
func_80282D90(camera, (struct struct_80286A04 *) D_80285C38, (struct struct_80286A04 *) D_80285C74, 0);
}
-// todo: What does this even do?
+//! @todo What does this even do?
void func_802846E4(struct CinematicCamera *camera) {
func_80282D90(camera, (struct struct_80286A04 *) D_80285CB0, (struct struct_80286A04 *) D_80285CE0, 0);
diff --git a/src/ending/ceremony_data.inc.c b/src/ending/ceremony_data.inc.c
index b406a2b1d..2fac983a7 100644
--- a/src/ending/ceremony_data.inc.c
+++ b/src/ending/ceremony_data.inc.c
@@ -1884,7 +1884,7 @@ u8 texture_podium3[] = {
#include "assets/ending_ceremony/gTexturePodium3.inc.c"
};
-// Todo: rename this to left_ or right_ instead of model2.
+//! @todo rename this to left_ or right_ instead of model2.
Vtx short_podium_model2[] = {
{{{ -7, 0, -21}, 0, { 0, 0}, {0xc8, 0xe3, 0xff, 0xff}}},
diff --git a/src/ending/code_80281780.c b/src/ending/code_80281780.c
index 036b6550c..a638c6264 100644
--- a/src/ending/code_80281780.c
+++ b/src/ending/code_80281780.c
@@ -53,7 +53,7 @@ void debug_switch_character_ceremony_cutscene(void) {
} else {
gCharacterSelections[0] = MARIO;
}
- // todo: confirm this.
+ //! @todo confirm this.
// Resets gCharacterIdByGPOverallRank to default?
bcopy(&defaultCharacterIds, &gCharacterIdByGPOverallRank, 8);
}
@@ -132,7 +132,7 @@ void load_ceremony_cutscene(void) {
D_800DC5BC = (u16)0;
D_800DC5C8 = (u16)0;
gSurfaceMap = (mk64_surface_map_ram *) gNextFreeMemoryAddress;
- // @bug these segmented addresses need to be symbols for mobility
+ //! @bug these segmented addresses need to be symbols for mobility
set_vertex_data_with_default_section_id(0x070067E8, -1);
set_vertex_data_with_default_section_id(0x0700AEF8, -1);
set_vertex_data_with_default_section_id(0x0700A970, 8);
diff --git a/src/ending/podium_ceremony_actors.c b/src/ending/podium_ceremony_actors.c
index b2fd207ae..8147d22ac 100644
--- a/src/ending/podium_ceremony_actors.c
+++ b/src/ending/podium_ceremony_actors.c
@@ -124,8 +124,8 @@ CeremonyActor *find_available_entry(void) {
CeremonyActor *new_actor(ActorInitParams *arg0) {
CeremonyActor *actor = find_available_entry();
- // @bug No null check.
- // todo: More indepth error checking/return value
+ //! @bug No null check.
+ //! @todo More indepth error checking/return value
#ifdef AVOID_UB
if (actor == NULL) {
return (CeremonyActor*) &sPodiumActorList[0]; // Return first actor to prevent crash
diff --git a/src/hud_renderer.c b/src/hud_renderer.c
index 780eeb514..190cb8b86 100644
--- a/src/hud_renderer.c
+++ b/src/hud_renderer.c
@@ -388,7 +388,7 @@ void func_80045F18(u8 *texture, Vtx *arg1, s32 width, s32 arg3, s32 height, s32
gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF);
}
-// todo: tlut/texture unconfirmed. This could be texture1 and texture2
+//! @todo tlut/texture unconfirmed. This could be texture1 and texture2
UNUSED void func_80046030(u8 *tlut, u8 *texture, Vtx *arg2, s32 width, s32 arg4, s32 height) {
s32 var_s0 = 0;
u8 *img1 = tlut;
@@ -1419,7 +1419,7 @@ void func_8004B7DC(s32 x, s32 y, s32 width, s32 height, s32 arg4, s32 arg5, s32
s32 yh2 = ((y + height) << 2);
if (arg6 == 0) {
- // todo: Update to F3DEX. Uses OLD definition for gspTextureRectangle.
+ //! @todo Update to F3DEX. Uses OLD definition for gspTextureRectangle.
gSPTextureRectangle(gDisplayListHead++, xl, yl, xh, yh, G_TX_RENDERTILE, arg4 << 5, (arg5 << 5), 4 << 10, 1 << 10);
return;
}
@@ -1589,7 +1589,7 @@ void func_8004C268(u32 arg0, u32 arg1, u8 *texture, u32 width, u32 arg4, u32 hei
for (i = 0; (u32)i < (arg4 / height); i++) {
func_80043D50(img2, width, height);
func_8004B97C(arg0, arg1, width, height, arg6);
- // todo: fakematch?
+ //! @todo fakematch?
#ifdef AVOID_UB
img2 += (width * height) * 2;
#else
diff --git a/src/main.c b/src/main.c
index 86d63419d..8af6eb580 100644
--- a/src/main.c
+++ b/src/main.c
@@ -410,7 +410,7 @@ void end_master_display_list(void) {
}
// clear_frame_buffer from SM64, with a few edits
-//! TODO: Why did void* work for matching
+//! @todo Why did void* work for matching
void *clear_framebuffer(s32 color) {
gDPPipeSync(gDisplayListHead++);
@@ -1145,8 +1145,10 @@ void update_gamestate(void) {
gCurrentlyLoadedCourseId = COURSE_NULL;
break;
case RACING:
- // @bug Reloading this segment makes random_u16() deterministic for player spawn order.
- // In laymens terms, random_u16() outputs the same value every time.
+ /**
+ * @bug Reloading this segment makes random_u16() deterministic for player spawn order.
+ * In laymens terms, random_u16() outputs the same value every time.
+ */
init_segment_racing();
setup_race();
break;
diff --git a/src/main.h b/src/main.h
index 2633be23e..08bfd7c05 100644
--- a/src/main.h
+++ b/src/main.h
@@ -20,12 +20,12 @@
#define MTX_OBJECT_POOL_SIZE 128
-// TODO: Verify with proper documentation
+//! @todo Verify with proper documentation
// functions called by mtxShadow multiply by 8
// 8 CPU Players * 4 real players in coop
#define MTX_SHADOW_POOL_SIZE 8 * 4
-// TODO: Verify with proper documentation
+//! @todo Verify with proper documentation
// functions called by mtxKart multiply by 8
// 8 CPU Players * 4 real players in coop
#define MTX_KART_POOL_SIZE 8 * 4
diff --git a/src/os/contpfs.c b/src/os/contpfs.c
index 5946547ae..4aecdaa2d 100644
--- a/src/os/contpfs.c
+++ b/src/os/contpfs.c
@@ -56,7 +56,8 @@ s32 __osRepairPackId(OSPfs *pfs, __OSPackId *badid, __OSPackId *newid)
{
pfs->activebank = j;
ERRCK(__osPfsSelectBank(pfs))
- ERRCK(__osContRamRead(pfs->queue, pfs->channel, 0, (u8*)&temp)); //TODO: fix magic number
+ //! @todo fix magic number
+ ERRCK(__osContRamRead(pfs->queue, pfs->channel, 0, (u8*)&temp));
temp[0] = j | 0x80;
for (i = 1; i < ARRLEN(temp); i++)
{
@@ -80,7 +81,8 @@ s32 __osRepairPackId(OSPfs *pfs, __OSPackId *badid, __OSPackId *newid)
ERRCK(__osPfsSelectBank(pfs));
ERRCK(__osContRamRead(pfs->queue, pfs->channel, 0, (u8*)temp));
if (temp[0] != 128)
- break; //TODO: remove magic constant
+ //! @todo remove magic constant
+ break;
}
j++;
}
@@ -173,7 +175,8 @@ s32 __osGetId(OSPfs *pfs)
return ret;
}
}
- if ((id->deviceid & 1) == 0) //TODO: remove magic constant
+ //! @todo remove magic constant
+ if ((id->deviceid & 1) == 0)
{
ERRCK(__osRepairPackId(pfs, id, &newid));
id = &newid;
@@ -186,7 +189,8 @@ s32 __osGetId(OSPfs *pfs)
}
pfs->version = id->version;
pfs->banks = id->banks;
- pfs->inode_start_page = pfs->banks * 2 + 3; //TODO: loads of magic constants..
+ //! @todo loads of magic constants..
+ pfs->inode_start_page = pfs->banks * 2 + 3;
pfs->dir_size = 16;
pfs->inode_table = 8;
pfs->minode_table = pfs->banks * PFS_ONE_PAGE + 8;
@@ -240,7 +244,8 @@ s32 __osPfsRWInode(OSPfs *pfs, __OSInode *inode, u8 flag, u8 bank)
for (j = 0; j < 8; j++)
{
- addr = ((u8 *)inode->inode_page + j * 32); //TODO: don't like this =/ //maybe &inode->inode_table[j*PFS_ONE_PAGE].ipage or something
+ //! @todo don't like this =/ //maybe &inode->inode_table[j*PFS_ONE_PAGE].ipage or something
+ addr = ((u8 *)inode->inode_page + j * 32);
if (flag == PFS_WRITE)
{
ret = __osContRamWrite(pfs->queue, pfs->channel, pfs->inode_table + bank * 8 + j, addr, FALSE);
diff --git a/src/os/leointerrupt.c b/src/os/leointerrupt.c
index 83a4f39ec..db221dba9 100644
--- a/src/os/leointerrupt.c
+++ b/src/os/leointerrupt.c
@@ -8,7 +8,7 @@ u8 leoDiskStack[OS_PIM_STACKSIZE]; // technically should have a OS_LEO_STACKSIZE
#ifdef VERSION_SH
-// TODO: so many magic constants :'(
+//! @todo so many magic constants :'(
static void __osLeoResume(void);
static void __osLeoAbnormalResume(void);
diff --git a/src/os/math/cosf.c b/src/os/math/cosf.c
index 2b01c12a5..be8816344 100644
--- a/src/os/math/cosf.c
+++ b/src/os/math/cosf.c
@@ -1,6 +1,6 @@
// These unions are necessary to put the constants in .rodata rather than .data.
-// TODO: is it possible to remove them somehow?
+//! @todo is it possible to remove them somehow?
typedef union {
/* 0x0 */ double d;
diff --git a/src/os/math/sinf.c b/src/os/math/sinf.c
index bdc83168e..e893adbe1 100644
--- a/src/os/math/sinf.c
+++ b/src/os/math/sinf.c
@@ -1,6 +1,6 @@
// These unions are necessary to put the constants in .rodata rather than .data.
-// TODO: is it possible to remove them somehow?
+//! @todo is it possible to remove them somehow?
typedef union {
/* 0x0 */ double d;
diff --git a/src/os/osContInit.c b/src/os/osContInit.c
index 1e85c7fbe..6a20606df 100644
--- a/src/os/osContInit.c
+++ b/src/os/osContInit.c
@@ -31,7 +31,8 @@ s32 osContInit(OSMesgQueue *mq, u8 *bitpattern, OSContStatus *status) {
osSetTimer(&timer, 500000 * osClockRate / 1000000 - currentTime, 0, &timerMesgQueue, &mesg);
osRecvMesg(&timerMesgQueue, &mesg, OS_MESG_BLOCK);
}
- _osContNumControllers = 4; // TODO: figure out what it means
+ //! @todo figure out what it means
+ _osContNumControllers = 4;
__osPackRequestData(0);
ret = __osSiRawStartDma(OS_WRITE, _osContCmdBuf);
osRecvMesg(mq, &mesg, OS_MESG_BLOCK);
diff --git a/src/os/osCreatePiManager.c b/src/os/osCreatePiManager.c
index da3b028f0..68c491eb6 100644
--- a/src/os/osCreatePiManager.c
+++ b/src/os/osCreatePiManager.c
@@ -2,7 +2,8 @@
#define OS_PI_MGR_MESG_BUFF_SIZE 1
-#ifdef VERSION_SH // TODO: In libreultra this is in an include
+//! @todo In libreultra this is in an include
+#ifdef VERSION_SH
extern OSPiHandle *CartRomHandle;
extern OSPiHandle *LeoDiskHandle;
#endif
diff --git a/src/os/osEPiRawStartDma.c b/src/os/osEPiRawStartDma.c
index b8cd8245a..31d9fd37c 100644
--- a/src/os/osEPiRawStartDma.c
+++ b/src/os/osEPiRawStartDma.c
@@ -2,13 +2,13 @@
#include "hardware.h"
#include "new_func.h"
#include "PR/R4300.h"
-// TODO: This define is from piint.h, but including that causes problems...
+//! @todo This define is from piint.h, but including that causes problems...
#define UPDATE_REG(reg, var) \
if (cHandle->var != pihandle->var) \
IO_WRITE(reg, pihandle->var);
-// TODO: This define is from os.h, but including that causes problems...
+//! @todo This define is from os.h, but including that causes problems...
#define PI_DOMAIN1 0
-// TODO: These defines are from PR/rcp.h, but including that causes problems...
+//! @todo These defines are from PR/rcp.h, but including that causes problems...
#define IO_WRITE(addr, data) (*(vu32 *) PHYS_TO_K1(addr) = (u32)(data))
s32 osEPiRawStartDma(OSPiHandle *pihandle, s32 dir, u32 cart_addr, void *dram_addr, u32 size) {
diff --git a/src/os/osEepromProbe.c b/src/os/osEepromProbe.c
index d550b8464..475af4469 100644
--- a/src/os/osEepromProbe.c
+++ b/src/os/osEepromProbe.c
@@ -1,6 +1,6 @@
#include "libultra_internal.h"
-// TODO: merge with osEepromWrite
+//! @todo merge with osEepromWrite
typedef struct {
u16 unk00;
u8 unk02;
diff --git a/src/os/osPfsDeleteFile.c b/src/os/osPfsDeleteFile.c
index ac784347a..c0e628ad0 100644
--- a/src/os/osPfsDeleteFile.c
+++ b/src/os/osPfsDeleteFile.c
@@ -31,7 +31,8 @@ s32 osPfsDeleteFile(OSPfs *pfs, u16 company_code, u32 game_code, u8 *game_name,
for (bank = dir.start_page.inode_t.bank; bank < pfs->banks;)
{
ERRCK(__osPfsRWInode(pfs, &inode, OS_READ, bank));
- ERRCK(__osPfsReleasePages(pfs, &inode, startpage, &sum, bank, &last_page, 1)); //TODO: magic constant
+ //! @todo magic constant
+ ERRCK(__osPfsReleasePages(pfs, &inode, startpage, &sum, bank, &last_page, 1));
ERRCK(__osPfsRWInode(pfs, &inode, OS_WRITE, bank));
if (last_page.ipage == 1)
break;
@@ -84,7 +85,8 @@ s32 __osPfsReleasePages(OSPfs *pfs, __OSInode *inode, u8 start_page, u16 *sum, u
if (next_page.inode_t.page < offset && next_page.ipage != 1)
return PFS_ERR_INCONSISTENT;
*last_page = next_page;
- if (flag == 1) //TODO: magic number
+ //! @todo magic number
+ if (flag == 1)
inode->inode_page[start_page].ipage = 3;
ERRCK(__osBlockSum(pfs, start_page, sum, bank));
diff --git a/src/os/osPiRawStartDma.c b/src/os/osPiRawStartDma.c
index ca6044e6e..4362b23b5 100644
--- a/src/os/osPiRawStartDma.c
+++ b/src/os/osPiRawStartDma.c
@@ -1,7 +1,8 @@
#include "libultra_internal.h"
#include "hardware.h"
-extern u32 osRomBase; // TODO: figure out why this is like this
+//! @todo figure out why this is like this
+extern u32 osRomBase;
s32 osPiRawStartDma(s32 dir, u32 cart_addr, void *dram_addr, size_t size) {
register int status;
diff --git a/src/os/osPiStartDma.c b/src/os/osPiStartDma.c
index 9940ba287..8dd0c22b8 100644
--- a/src/os/osPiStartDma.c
+++ b/src/os/osPiStartDma.c
@@ -10,7 +10,7 @@ s32 osPiStartDma(OSIoMesg *mb, s32 priority, s32 direction, uintptr_t devAddr, v
return -1;
}
- // TODO: name magic constants
+ //! @todo name magic constants
if (direction == OS_READ) {
mb->hdr.type = 11;
} else {
diff --git a/src/os/osViBlack.c b/src/os/osViBlack.c
index 277dfedb2..782e3b13c 100644
--- a/src/os/osViBlack.c
+++ b/src/os/osViBlack.c
@@ -2,7 +2,7 @@
extern OSViContext *__osViNext;
-// TODO: name magic constants
+//! @todo name magic constants
void osViBlack(u8 active) {
register u32 int_disabled = __osDisableInt();
if (active) {
diff --git a/src/os/osViSwapBuffer.c b/src/os/osViSwapBuffer.c
index c2cb1d506..eb341b6da 100644
--- a/src/os/osViSwapBuffer.c
+++ b/src/os/osViSwapBuffer.c
@@ -5,6 +5,7 @@ extern OSViContext *__osViNext;
void osViSwapBuffer(void *vaddr) {
u32 int_disabled = __osDisableInt();
__osViNext->buffer = vaddr;
- __osViNext->unk00 |= 0x10; // TODO: figure out what this flag means
+ //! @todo figure out what this flag means
+ __osViNext->unk00 |= 0x10;
__osRestoreInt(int_disabled);
}
diff --git a/src/os/piint.h b/src/os/piint.h
index 766021952..39278eed9 100644
--- a/src/os/piint.h
+++ b/src/os/piint.h
@@ -83,9 +83,12 @@
#define LEO_BM_CTL_SECTOR_MASK 0x00FF0000
#define LEO_BM_CTL_SECTOR_SHIFT 16
-#define LEO_CMD_TYPE_0 0 //TODO: name
-#define LEO_CMD_TYPE_1 1 //TODO: name
-#define LEO_CMD_TYPE_2 2 //TODO: name
+//! @todo name
+#define LEO_CMD_TYPE_0 0
+//! @todo name
+#define LEO_CMD_TYPE_1 1
+//! @todo name
+#define LEO_CMD_TYPE_2 2
#define LEO_ERROR_GOOD 0
#define LEO_ERROR_3 3
diff --git a/src/racing/actors.c b/src/racing/actors.c
index dc523fbfe..49a65aa5c 100644
--- a/src/racing/actors.c
+++ b/src/racing/actors.c
@@ -1209,7 +1209,7 @@ void render_actor_shell(Camera *camera, Mat4 matrix, struct ShellActor *shell) {
0x1c00, 0x1800, 0x1400, 0x1000,
0x0c00, 0x0800, 0x0400
};
- // todo: Is this making the shell spin?
+ //! @todo Is this making the shell spin?
// Is it doing this by modifying a an address?
uintptr_t phi_t3;
diff --git a/src/racing/collision.c b/src/racing/collision.c
index 9f617858a..3a24b5183 100644
--- a/src/racing/collision.c
+++ b/src/racing/collision.c
@@ -1965,10 +1965,12 @@ void func_802AF314(void) {
}
D_8015F58A = 0;
- // @bug possibly bug. Allocate memory but not increment the pointer.
- // This is bad, dumb code, and more importantly it's bad dumb code that doesn't make any sense here.
- // It is incremented after this function completes using a different variable.
- // Not good.
+ /**
+ * @bug possibly bug. Allocate memory but not increment the pointer.
+ * This is bad, dumb code, and more importantly it's bad dumb code that doesn't make any sense here.
+ * It is incremented after this function completes using a different variable.
+ * Not good.
+ */
D_8015F584 = (u16 *) gNextFreeMemoryAddress;
for (j = 0; j < 32; j++) {
diff --git a/src/racing/math_util.c b/src/racing/math_util.c
index 205106f9d..910b6d48a 100644
--- a/src/racing/math_util.c
+++ b/src/racing/math_util.c
@@ -126,7 +126,8 @@ void *vec3f_copy_return(Vec3f dest, Vec3f src) {
dest[0] = src[0];
dest[1] = src[1];
dest[2] = src[2];
- return &dest; //! warning: function returns address of local variable
+ //! @warning function returns address of local variable
+ return &dest;
}
void vec3s_copy(Vec3s dest, Vec3s src) {
diff --git a/src/racing/race_logic.c b/src/racing/race_logic.c
index 9dce59e98..1d0ce9b50 100644
--- a/src/racing/race_logic.c
+++ b/src/racing/race_logic.c
@@ -794,7 +794,7 @@ void func_8028F970(void) {
return;
}
- // todo: increasing players past four would require increase this loop iterator.
+ //! @todo increasing players past four would require increase this loop iterator.
for (i = 0; i < 4; i++) {
Player *player = &gPlayers[i];
diff --git a/src/racing/render_courses.c b/src/racing/render_courses.c
index 942974520..cfa0ef560 100644
--- a/src/racing/render_courses.c
+++ b/src/racing/render_courses.c
@@ -76,7 +76,7 @@ void load_surface_map(uintptr_t addr, struct UnkStruct_800DC5EC *arg1) {
Camera *camera = arg1->camera;
u32 segment = SEGMENT_NUMBER2(addr);
u32 offset = SEGMENT_OFFSET(addr);
- // todo: Should be Gfx*
+ //! @todo Should be Gfx*
s32 *gfx = (s32 *) VIRTUAL_TO_PHYSICAL2(gSegmentTable[segment] + offset);
s16 var_a3;
s16 temp_v1;