Some error fixing

This commit is contained in:
MegaMech
2024-05-01 23:53:34 -06:00
parent 28f3ff690a
commit c76d7d4b9b
8 changed files with 17 additions and 346 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")
include(FindFontconfig)
if (WIN32)
include(cmake/automate-vcpkg.cmake)
include(libultraship/cmake/automate-vcpkg.cmake)
# Forced to use MSVC
set(MSVC ON)
-1
View File
@@ -1,6 +1,5 @@
#include <libultraship.h>
#include <macros.h>
#include <PR/ucode.h>
#include "audio/synthesis.h"
#include "audio/seqplayer.h"
+11 -11
View File
@@ -378,7 +378,7 @@ Acmd *synthesis_process_note(s32 noteIndex, struct NoteSubEu *noteSubEu, struct
curLoadedBook = NULL;
note = &gNotes[noteIndex];
flags = 0;
if (noteSubEu->needsInit == TRUE) {
if (noteSubEu->needsInit == true) {
flags = A_INIT;
synthesisState->restart = 0;
synthesisState->samplePosInt = 0;
@@ -434,13 +434,13 @@ Acmd *synthesis_process_note(s32 noteIndex, struct NoteSubEu *noteSubEu, struct
s32 samplesRemaining;
s32 s1;
noteFinished = FALSE;
restart = FALSE;
noteFinished = false;
restart = false;
s3 = synthesisState->samplePosInt & 0xF;
samplesRemaining = endPos - synthesisState->samplePosInt;
nSamplesToProcess = samplesLenAdjusted - nAdpcmSamplesProcessed;
if ((s3 == 0) && (synthesisState->restart == FALSE)) {
if ((s3 == 0) && (synthesisState->restart == false)) {
s3 = 16;
}
@@ -485,11 +485,11 @@ Acmd *synthesis_process_note(s32 noteIndex, struct NoteSubEu *noteSubEu, struct
var_t2 = 0;
}
if (synthesisState->restart != FALSE) {
if (synthesisState->restart != false) {
aSetLoop(cmd++, VIRTUAL_TO_PHYSICAL2(audioBookSample->loop->state));
flags = A_LOOP;
synthesisState->restart = FALSE;
synthesisState->restart = false;
}
nSamplesInThisIteration = (s1 + a1) - var_s6;
s5Aligned = ALIGN(s4 + 16, 4);
@@ -541,7 +541,7 @@ Acmd *synthesis_process_note(s32 noteIndex, struct NoteSubEu *noteSubEu, struct
func_800B6FB4(updateIndex, noteIndex);
} else {
if (restart) {
synthesisState->restart = TRUE;
synthesisState->restart = true;
synthesisState->samplePosInt = loopInfo->start;
} else {
synthesisState->samplePosInt += nSamplesToProcess;
@@ -559,7 +559,7 @@ Acmd *synthesis_process_note(s32 noteIndex, struct NoteSubEu *noteSubEu, struct
aDownsampleHalf(cmd++, ALIGN(samplesLenAdjusted / 2, 3), 0x1A0 + spFC, DMEM_ADDR_RESAMPLED);
resampledTempLen = samplesLenAdjusted;
noteSamplesDmemAddrBeforeResampling = DMEM_ADDR_RESAMPLED;
if (noteSubEu->finished != FALSE) {
if (noteSubEu->finished != false) {
aClearBuffer(cmd++, noteSamplesDmemAddrBeforeResampling + resampledTempLen, samplesLenAdjusted + 0x10);
}
break;
@@ -570,15 +570,15 @@ Acmd *synthesis_process_note(s32 noteIndex, struct NoteSubEu *noteSubEu, struct
}
break;
}
if (noteSubEu->finished != FALSE) {
if (noteSubEu->finished != false) {
break;
}
}
}
flags = 0;
if (noteSubEu->needsInit == TRUE) {
if (noteSubEu->needsInit == true) {
flags = A_INIT;
noteSubEu->needsInit = FALSE;
noteSubEu->needsInit = false;
}
cmd = final_resample(cmd, synthesisState, inBuf * 2, resamplingRateFixedPoint, noteSamplesDmemAddrBeforeResampling, flags);
+1 -1
View File
@@ -16,7 +16,7 @@ void func_802B0648(struct BananaBunchParent*);
void func_802B0788(s16, struct BananaBunchParent*, Player*);
s32 func_802B09C0(s16);
void update_actor_banana_bunch(struct BananaBunchParent*);
s32 is_shell_exist(s16);
bool is_shell_exist(s16);
void update_actor_triple_shell(TripleShellParent*, s16);
s32 use_banana_bunch_item(Player*);
s32 use_triple_shell_item(Player*, s16);
-1
View File
@@ -4,7 +4,6 @@
#include <math_util.h>
#include <main.h>
#include "buffers.h"
#include <PR/rcp.h>
#include "buffers/trig_tables.h"
#include "math.h"
#include "memory.h"
+1 -2
View File
@@ -1,8 +1,7 @@
#ifndef MATH_UTIL_H
#define MATH_UTIL_H
#include <libultra/types.h>
#include <libultraship.h>
//#define sins(x) gSineTable[(u16) (x) >> 4]
//#define coss(x) gCosineTable[(u16) (x) >> 4]
+3 -2
View File
@@ -1,4 +1,5 @@
#include <libultraship.h>
#include <libultra/gbi.h>
#include <macros.h>
#include <mk64.h>
#include <common_structs.h>
@@ -73,7 +74,7 @@ void load_surface_map(uintptr_t addr, struct UnkStruct_800DC5EC *arg1) {
Player *player = arg1->player;
Camera *camera = arg1->camera;
//! @todo Should be Gfx*
Gfx* gfx = (Gfx*) addr;
Gfx** gfx = (Gfx**) &addr;
s16 var_a3;
s16 temp_v1;
s16 sp1E;
@@ -177,7 +178,7 @@ void load_surface_map(uintptr_t addr, struct UnkStruct_800DC5EC *arg1) {
arg1->pathCounter = temp_v1;
temp_v1 = ((temp_v1 - 1) * 4) + var_a3;
gSPDisplayList(gDisplayListHead++, gfx[temp_v1]);
gSPDisplayList(gDisplayListHead++, (Gfx *)gfx[temp_v1]);
}
void func_80291198(void) {
-327
View File
@@ -1,327 +0,0 @@
:config:
segments:
- [0x02, 0x12AAE0]
- [0x0D, 0x132B50]
header:
code:
- '#include <macros.h>'
- '#include <libultraship.h>'
- '#include <common_structs.h>'
- '#include <libultra/types.h>'
- '#include <libultra/gbi.h>'
- '#include "data_segment2.h"'
- '#include <assets/startup_logo.h>'
header:
- '#include <libultra/gbi.h>'
# D_02007650:
# symbol: D_02007650
# type: gfx
# offset: 0x7650
# D_020076B0:
# symbol: D_020076B0
# type: Gfx
# offset: 0x76B0
# D_020076E0:
# symbol: D_020076E0
# type: Gfx
# offset: 0x76E0
# D_02007708:
# symbol: D_02007708
# type: Gfx
# offset: 0x7708
# D_02007728:
# symbol: D_02007728
# type: Gfx
# offset: 0x7728
# D_02007748:
# symbol: D_02007748
# type: Gfx
# offset: 0x7748
# D_02007768:
# symbol: D_02007768
# type: Gfx
# offset: 0x7768
# D_02007788:
# symbol: D_02007788
# type: Gfx
# offset: 0x7788
# D_020077A8:
# symbol: D_020077A8
# type: Gfx
# offset: 0x77A8
# D_020077D8:
# symbol: D_020077D8
# type: Gfx
# offset: 0x77D8
# D_020077F8:
# symbol: D_020077F8
# type: Gfx
# offset: 0x77F8
# D_02007818:
# symbol: D_02007818
# type: Gfx
# offset: 0x7818
# D_02007838:
# symbol: D_02007838
# type: Gfx
# offset: 0x7838
# D_02007858:
# symbol: D_02007858
# type: Gfx
# offset: 0x7858
# D_02007878:
# symbol: D_02007878
# type: Gfx
# offset: 0x7878
# D_02007898:
# symbol: D_02007898
# type: Gfx
# offset: 0x7898
# D_020078B8:
# symbol: D_020078B8
# type: Gfx
# offset: 0x78B8
# D_020078D8:
# symbol: D_020078D8
# type: Gfx
# offset: 0x78D8
# D_020078F8:
# symbol: D_020078F8
# type: Gfx
# offset: 0x78F8
# D_02007918:
# symbol: D_02007918
# type: Gfx
# offset: 0x7918
# D_02007938:
# symbol: D_02007938
# type: Gfx
# offset: 0x7938
# D_02007958:
# symbol: D_02007958
# type: Gfx
# offset: 0x7958
# D_02007978:
# symbol: D_02007978
# type: Gfx
# offset: 0x7978
# D_02007998:
# symbol: D_02007998
# type: Gfx
# offset: 0x7998
# D_020079B8:
# symbol: D_020079B8
# type: Gfx
# offset: 0x79B8
# D_020079D8:
# symbol: D_020079D8
# type: Gfx
# offset: 0x79D8
# D_020079F8:
# symbol: D_020079F8
# type: Gfx
# offset: 0x79F8
# D_02007A18:
# symbol: D_02007A18
# type: Gfx
# offset: 0x7A18
# D_02007A38:
# symbol: D_02007A38
# type: Gfx
# offset: 0x7A38
# D_02007A58:
# symbol: D_02007A58
# type: Gfx
# offset: 0x7A58
# D_02007A78:
# symbol: D_02007A78
# type: Gfx
# offset: 0x7A78
# D_02007A98:
# symbol: D_02007A98
# type: Gfx
# offset: 0x7A98
# D_02007AB8:
# symbol: D_02007AB8
# type: Gfx
# offset: 0x7AB8
# D_02007AD8:
# symbol: D_02007AD8
# type: Gfx
# offset: 0x7AD8
# D_02007AF8:
# symbol: D_02007AF8
# type: Gfx
# offset: 0x7AF8
# D_02007B18:
# symbol: D_02007B18
# type: Gfx
# offset: 0x7B18
# D_02007B38: # unused
# symbol: D_02007B38
# type: vtx
# offset: 0x7B38
# count: 8
# D_02007BB8:
# symbol: D_02007BB8
# type: vtx
# offset: 0x7BB8
# count: 54
# D_02007BD8:
# symbol: D_02007BD8
# type: vtx
# offset: 0x7BD8
# count: 2
# D_02007BF8:
# symbol: D_02007BF8
# type: vtx
# offset: 0x7BF8
# count: 2
# D_02007C18:
# symbol: D_02007C18
# type: vtx
# offset: 0x7C18
# count: 2
# D_02007C38:
# symbol: D_02007C38
# type: vtx
# offset: 0x7C38
# count: 2
# D_02007C58:
# symbol: D_02007C58
# type: vtx
# offset: 0x7C58
# count: 2
# D_02007C78:
# symbol: D_02007C78
# type: vtx
# offset: 0x7C78
# count: 2
# D_02007C98:
# symbol: D_02007C98
# type: vtx
# offset: 0x7C98
# count: 2
# D_02007CB8:
# symbol: D_02007CB8
# type: vtx
# offset: 0x7CB8
# count: 2
# D_02007CD8:
# symbol: D_02007CD8
# type: vtx
# offset: 0x7CD8
# count: 2
# D_02007CF8:
# symbol: D_02007CF8
# type: vtx
# offset: 0x7CF8
# count: 2
# D_02007D18:
# symbol: D_02007D18
# type: vtx
# offset: 0x7D18
# count: 2
# D_02007D38:
# symbol: D_02007D38
# type: vtx
# offset: 0x7D38
# count: 2
# D_02007D58:
# symbol: D_02007D58
# type: vtx
# offset: 0x7D58
# count: 2
# D_02007D78:
# symbol: D_02007D78
# type: vtx
# offset: 0x7D78
# count: 2
# D_02007D98:
# symbol: D_02007D98
# type: vtx
# offset: 0x7D98
# count: 2
# D_02007DB8:
# symbol: D_02007DB8
# type: vtx
# offset: 0x7DB8
# count: 2
# D_02007DD8:
# symbol: D_02007DD8
# type: vtx
# offset: 0x7DD8
# count: 2
# D_02007DF8:
# symbol: D_02007DF8
# type: vtx
# offset: 0x7DF8
# count: 2
# D_02007E18:
# symbol: D_02007E18
# type: vtx
# offset: 0x7E18
# count: 2
# D_02007E38:
# symbol: D_02007E38
# type: vtx
# offset: 0x7E38
# count: 2
# D_02007E58:
# symbol: D_02007E58
# type: vtx
# offset: 0x7E58
# count: 2
# D_02007E78:
# symbol: D_02007E78
# type: vtx
# offset: 0x7E78
# count: 2
# D_02007E98:
# symbol: D_02007E98
# type: vtx
# offset: 0x7E98
# count: 2
# D_02007EB8:
# symbol: D_02007EB8
# type: vtx
# offset: 0x7EB8
# count: 2
# D_02007ED8:
# symbol: D_02007ED8
# type: vtx
# offset: 0x7ED8
# count: 2
# D_02007EF8:
# symbol: D_02007EF8
# type: vtx
# offset: 0x7EF8
# count: 2
# D_02007F18:
# symbol: D_02007F18
# type: gfx
# offset: 0x7F18
# D_02007F48:
# symbol: D_02007F48
# type: gfx
# offset: 0x7F48
# D_02007F60:
# symbol: D_02007F60
# type: gfx
# offset: 0x7F60
# D_02007FC8:
# symbol: D_02007FC8
# type: gfx
# offset: 0x7FC8
# D_02008008:
# symbol: D_02008008
# type: gfx
# offset: 0x8008
# D_02008030:
# symbol: D_02008030
# type: gfx
# offset: 0x8030
# D_02008058:
# symbol: D_02008058
# type: gfx
# offset: 0x8058