summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorKiritoDv <kiritodev01@gmail.com>2024-05-01 10:09:49 -0600
committerKiritoDv <kiritodev01@gmail.com>2024-05-01 10:09:49 -0600
commita2c3feb67a2f8afb1cebd0e77e4a3e23db2c28c4 (patch)
tree4250a53478f87b8b07e16481a634ef16550ddb43 /src/main.c
parentd5264825f0a7ab67f53fca8857cbd24dd86ee86d (diff)
WIP Compilation
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/main.c b/src/main.c
index 19eb4f4c5..74146d418 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,7 +1,7 @@
#ifndef GCC
#define D_800DC510_AS_U16
#endif
-#include <ultra64.h>
+#include <libultraship.h>
#include <PR/os.h>
#include <PR/ucode.h>
#include <macros.h>
@@ -230,7 +230,7 @@ void thread1_idle(void *arg) {
osViSetMode(&osViModeTable[OS_VI_MPAL_LAN1]);
}
#endif
- osViBlack(TRUE);
+ osViBlack(true);
osViSetSpecialFeatures(OS_VI_GAMMA_OFF);
osCreatePiManager(OS_PRIORITY_PIMGR, &gPIMesgQueue, gPIMesgBuf, ARRAY_COUNT(gPIMesgBuf));
wasSoftReset = (s16) osResetType;
@@ -241,7 +241,7 @@ void thread1_idle(void *arg) {
osSetThreadPri(NULL, 0);
// Halt
- while (TRUE);
+ while (true);
}
void setup_mesg_queues(void) {
@@ -306,9 +306,9 @@ void init_controllers(void) {
osSetEventMesg(OS_EVENT_SI, &gSIEventMesgQueue, (OSMesg) 0x33333333);
osContInit(&gSIEventMesgQueue, &gControllerBits, gControllerStatuses);
if ((gControllerBits & 1) == 0) {
- sIsController1Unplugged = TRUE;
+ sIsController1Unplugged = true;
} else {
- sIsController1Unplugged = FALSE;
+ sIsController1Unplugged = false;
}
}
@@ -517,7 +517,7 @@ void setup_game_memory(void) {
init_segment_racing();
gHeapEndPtr = SEG_RACING;
set_segment_base_addr(0, (void *) SEG_START);
-
+
// Memory pool size of 0xAB630
initialize_memory_pool(MEMORY_POOL_START, MEMORY_POOL_END);
@@ -529,7 +529,7 @@ void setup_game_memory(void) {
osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK);
set_segment_base_addr(2, (void *) load_data(SEG_DATA_START, SEG_DATA_END));
-
+
commonCourseDataSize = COMMON_TEXTURES_SIZE;
commonCourseDataSize = ALIGN16(commonCourseDataSize);
@@ -613,14 +613,14 @@ void race_logic_loop(void) {
D_8015F788 = 0;
render_player_one_1p_screen();
if (!gEnableDebugMode) {
- D_800DC514 = FALSE;
+ D_800DC514 = false;
} else {
if (D_800DC514) {
if ((gControllerOne->buttonPressed & R_TRIG) &&
(gControllerOne->button & A_BUTTON) &&
(gControllerOne->button & B_BUTTON)) {
- D_800DC514 = FALSE;
+ D_800DC514 = false;
}
rotY = camera1->rot[1];
@@ -641,7 +641,7 @@ void race_logic_loop(void) {
if ((gControllerOne->buttonPressed & L_TRIG) &&
(gControllerOne->button & A_BUTTON) &&
(gControllerOne->button & B_BUTTON)) {
- D_800DC514 = TRUE;
+ D_800DC514 = true;
}
}
}
@@ -872,7 +872,7 @@ void game_state_handler(void) {
(gControllerOne->button & Z_TRIG) &&
(gControllerOne->button & A_BUTTON)) {
gGamestateNext = CREDITS_SEQUENCE;
- } else if ((gControllerOne->button & L_TRIG) &&
+ } else if ((gControllerOne->button & L_TRIG) &&
(gControllerOne->button & R_TRIG) &&
(gControllerOne->button & Z_TRIG) &&
(gControllerOne->button & B_BUTTON)) {
@@ -1080,7 +1080,7 @@ void thread3_video(UNUSED void *arg0) {
create_thread(&gGameLoopThread, 5, &thread5_game_loop, 0, gGameLoopThreadStack + ARRAY_COUNT(gGameLoopThreadStack), 10);
osStartThread(&gGameLoopThread);
- while (TRUE) {
+ while (true) {
osRecvMesg(&gIntrMesgQueue, &msg, OS_MESG_BLOCK);
switch ((u32) msg) {
case MESG_VI_VBLANK:
@@ -1147,7 +1147,7 @@ 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.
*/
@@ -1189,7 +1189,7 @@ void thread5_game_loop(UNUSED void *arg) {
read_controllers();
func_800C5CB8();
- while(TRUE) {
+ while(true) {
func_800CB2C4();
// Update the gamestate if it has changed (racing, menus, credits, etc.).
@@ -1215,7 +1215,7 @@ void thread4_audio(UNUSED void *arg) {
osCreateMesgQueue(&sSoundMesgQueue, sSoundMesgBuf, ARRAY_COUNT(sSoundMesgBuf));
set_vblank_handler(1, &sSoundVblankHandler, &sSoundMesgQueue, (OSMesg) 512);
- while (TRUE) {
+ while (true) {
OSMesg msg;
struct SPTask *spTask;