WIP Compilation

This commit is contained in:
KiritoDv
2024-05-01 10:09:49 -06:00
parent d5264825f0
commit a2c3feb67a
328 changed files with 5338 additions and 11674 deletions
+1 -1
View File
@@ -63,7 +63,7 @@
#include <segments.h>
#include <sounds.h>
#include "buffers/trig_tables.h"
#include <ultra64.h>
#include <libultraship.h>
#include <vehicles.h>
#include <waypoints.h>
+5 -5
View File
@@ -1,4 +1,4 @@
#include <ultra64.h>
#include <libultraship.h>
#include <macros.h>
#include <mk64.h>
#include <stdarg.h>
@@ -126,9 +126,9 @@ void crash_screen_print(s32 x, s32 y, const char *fmt, ...) {
void crash_screen_sleep(s32 ms) {
u64 cycles = ms * 1000LL * osClockRate / 1000000ULL;
osSetTime(0);
while (osGetTime() < cycles) {
}
// osSetTime(0);
// while (osGetTime() < cycles) {
// }
}
void crash_screen_print_float_reg(s32 x, s32 y, s32 regNum, void *addr) {
@@ -215,6 +215,6 @@ void crash_screen_draw(OSThread* thread) {
crash_screen_print_float_reg(120, 210, 26, &tc->fp26.f.f_even);
crash_screen_print_float_reg(210, 210, 28, &tc->fp28.f.f_even);
crash_screen_print_float_reg(30, 220, 30, &tc->fp30.f.f_even);
osViBlack(FALSE);
osViBlack(false);
osViSwapBuffer(pFramebuffer);
}
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef CRASH_SCREEN_ENHANCEMENT_H
#define CRASH_SCREEN_ENHANCEMENT_H
#include <ultra64.h>
#include <libultraship.h>
#include <macros.h>
void crash_screen_draw(OSThread* thread);
+13 -13
View File
@@ -1,4 +1,4 @@
#include <ultra64.h>
#include <libultraship.h>
#include <debug.h>
#include "debug.inc.c"
#include <libc/stdio.h>
@@ -82,14 +82,14 @@ static u32 variable_to_u64(variableWatchAttributes *attribute) {
u32 variable;
switch (attribute->variableSize) {
case sizeof(u8):
case sizeof(u8):
variable = *((u8*) attribute->variablePointer);
break;
case sizeof(u16):
case sizeof(u16):
variable = *((u16*) attribute->variablePointer);
break;
case sizeof(u32):
case sizeof(u64):
case sizeof(u64):
variable = *((u32*) attribute->variablePointer); // no floating point rounding
break;
default:
@@ -103,7 +103,7 @@ static void round_up_float(u32 *variable, u8 variableSize) {
switch (variableSize) {
case sizeof(u64):
case sizeof(u32):
*variable = (u32) (*(f32*) &*variable);
*variable = (u32) (*(f32*) &*variable);
break;
default:
sDisplayListState = BAD;
@@ -131,7 +131,7 @@ static void u64_to_string(variableWatchAttributes *attribute, u32 variable, u8 b
switch (variableSize) {
case sizeof(u8):
signedVariable = (s8) variable;
if (signedVariable < 0) {
if (signedVariable < 0) {
signedVariable = -signedVariable;
variable = (u8) signedVariable;
*bufferedString = '-';
@@ -150,7 +150,7 @@ static void u64_to_string(variableWatchAttributes *attribute, u32 variable, u8 b
case sizeof(u32):
case sizeof(u64):
signedVariable = (s32) variable;
if (signedVariable < 0) {
if (signedVariable < 0) {
signedVariable = -signedVariable;
variable = (u32) signedVariable;
*bufferedString = '-';
@@ -164,11 +164,11 @@ static void u64_to_string(variableWatchAttributes *attribute, u32 variable, u8 b
// convert u64 into a string but it gets put in reverse
if (base != HEXIDECIMAL) {
do {
do {
stringLength++;
*bufferedString = variable % base + '0';
bufferedString++;
variable /= base;
variable /= base;
} while (variable != 0);
} else {
do {
@@ -186,8 +186,8 @@ static void u64_to_string(variableWatchAttributes *attribute, u32 variable, u8 b
} while (variable != 0);
}
bufferedString -= stringLength;
upperIndex = stringLength - 1;
bufferedString -= stringLength;
upperIndex = stringLength - 1;
// flip string 4321 --> 1234
for (lowerIndex = 0; lowerIndex < stringLength >> 1; lowerIndex++) {
@@ -228,7 +228,7 @@ static void u64_to_string(variableWatchAttributes *attribute, u32 variable, u8 b
static u32 _strlen(const char *str) {
u32 len;
len = 0;
for (; *str != '\0'; str++) {
len++;
@@ -245,7 +245,7 @@ static void _memcpy(char *destStr, const char *copyStr, u32 copySize) {
*destStr = *copyStr;
destStr++;
copyStr++;
}
}
}
#endif
+8 -8
View File
@@ -1,4 +1,4 @@
#include <ultra64.h>
#include <libultraship.h>
#include <debug.h>
#include "all_variables.h"
@@ -6,7 +6,7 @@
extern s32 gGlobalTimer;
/**
/**
* Edit this to edit what displays on the screen while the DVDL is active.
* The Size of the structure array is calculated at compile time.
*/
@@ -14,42 +14,42 @@ variableWatchAttributes gMainVariableWatchList[] = {
{
"Global Timer: ",
&gGlobalTimer,
sizeof(gGlobalTimer),
sizeof(gGlobalTimer),
DISPLAY_DECIMAL_NUMBER | DISPLAY_SIGNED_NUMBER,
0, 0
},
{
"Actors: ",
&gNumActors,
sizeof(gNumActors),
sizeof(gNumActors),
DISPLAY_DECIMAL_NUMBER,
0, 0
},
{
"Player Type: ",
&gPlayers[0].type,
sizeof(gPlayerOne->type),
sizeof(gPlayerOne->type),
DISPLAY_HEXIDECIMAL_NUMBER,
0, 0
},
{
"X ",
&gPlayers[0].pos[0],
sizeof(gPlayerOne->pos[0]),
sizeof(gPlayerOne->pos[0]),
DISPLAY_FLOAT_NUMBER,
0, 0
},
{
"Y ",
&gPlayers[0].pos[1],
sizeof(gPlayerOne->pos[1]),
sizeof(gPlayerOne->pos[1]),
DISPLAY_FLOAT_NUMBER,
0, 0
},
{
"Z ",
&gPlayers[0].pos[2],
sizeof(gPlayerOne->pos[2]),
sizeof(gPlayerOne->pos[2]),
DISPLAY_FLOAT_NUMBER,
0, 0
},