mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-05 07:24:34 +00:00
libultra cleanup (#215)
* cleanup libultra * fixes - use quotes instead of <> for includes - add macros for zelda specific thread priorities - fix Makefile - properly format the remaining pfs structs * fix button macros + add CHECK_BTN_ANY/CHECK_BTN_ALL * remove ULTRA_ABS * fix includes * update z_player.c/z_lib.c + run format.sh * merge upstream/master * fix include in En_Goroiwa * fix includes
This commit is contained in:
parent
6136ee6deb
commit
174af7384d
890 changed files with 2628 additions and 5625 deletions
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
void PreRender_SetValuesSave(PreRenderContext* this, u32 width, u32 height, void* fbuf, void* zbuf, void* cvg) {
|
||||
this->widthSave = width;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
void THGA_Ct(TwoHeadGfxArena* thga, Gfx* start, u32 size) {
|
||||
THA_Ct((TwoHeadArena*)thga, start, size);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <global.h>
|
||||
#include <vt.h>
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
|
||||
#define FILL_ALLOCBLOCK (1 << 0)
|
||||
#define FILL_FREEBLOCK (1 << 1)
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
void func_800C3C80(AudioMgr* audioMgr) {
|
||||
Sub_AudioMgr_18* sub;
|
||||
|
@ -91,7 +90,7 @@ void AudioMgr_Unlock(AudioMgr* audioMgr) {
|
|||
osRecvMesg(&audioMgr->unk_C8, NULL, OS_MESG_BLOCK);
|
||||
}
|
||||
|
||||
void AudioMgr_Start(AudioMgr* audioMgr, void* stack, OSPri pri, OSId id, SchedContext* sched, IrqMgr* irqMgr) {
|
||||
void AudioMgr_Init(AudioMgr* audioMgr, void* stack, OSPri pri, OSId id, SchedContext* sched, IrqMgr* irqMgr) {
|
||||
bzero(audioMgr, sizeof(AudioMgr));
|
||||
|
||||
audioMgr->sched = sched;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
|
||||
void Audio_SequenceChannelProcessSound(SequenceChannel* seqChannel, s32 recalculateVolume, s32 b) {
|
||||
f32 channelVolume;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
|
||||
f32 func_800DDE20(f32 arg0) {
|
||||
return 256.0f * gAudioContext.gAudioBufferParameters.unkUpdatesPerFrameScaled / arg0;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
void Audio_NoteSetVelPanReverb(Note* note, NoteSubEu* sub, Reverb* reverb) {
|
||||
f32 volRight, volLeft;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
|
||||
#define PORTAMENTO_IS_SPECIAL(x) ((x).mode & 0x80)
|
||||
#define PORTAMENTO_MODE(x) ((x).mode & ~0x80)
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_800430A0/func_800430A0.s")
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
void DynaPolyInfo_SetActorMove(DynaPolyActor* dynaActor, DynaPolyMoveFlag flags) {
|
||||
dynaActor->dynaPolyId = -1;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
void* MemCopy(void* dest, void* src, s32 size) {
|
||||
u8* destu = (u8*)dest;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
void func_8006BA00(GlobalContext* globalCtx) {
|
||||
SoundSource* sources = &globalCtx->soundSources[0];
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
void Flags_UnsetAllEnv(GlobalContext* globalCtx) {
|
||||
u8 i;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
f32 func_8006C510(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5) {
|
||||
char pad[0x1C];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
void func_8008E6A0(SubGlobalContext7B8* this) {
|
||||
this->counter = 0;
|
||||
|
@ -6,20 +6,20 @@ void func_8008E6A0(SubGlobalContext7B8* this) {
|
|||
}
|
||||
|
||||
u32 func_8008E6AC(SubGlobalContext7B8* this, Input* input) {
|
||||
if (CHECK_PAD(input->cur, R_TRIG) && CHECK_PAD(input->press, D_JPAD)) {
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_R) && CHECK_BTN_ALL(input->press.button, BTN_DDOWN)) {
|
||||
this->toggle = !this->toggle;
|
||||
}
|
||||
if (!this->toggle) {
|
||||
goto ret_true;
|
||||
}
|
||||
|
||||
if (CHECK_PAD(input->cur, Z_TRIG)) {
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_Z)) {
|
||||
|
||||
if (CHECK_PAD(input->press, R_TRIG)) {
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_R)) {
|
||||
goto ret_true;
|
||||
}
|
||||
|
||||
if (CHECK_PAD(input->cur, R_TRIG)) {
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_R)) {
|
||||
this->counter++;
|
||||
if (this->counter >= 9) {
|
||||
goto ret_true;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
// Bit Flag array in which gBitFlags[n] is literally (1 << n)
|
||||
u32 gBitFlags[] = {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ OSPiHandle piHandle;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
UnkRumbleStruct D_80160FD0;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
// Note : This file is related to z_vismono, the original name was probably z_vis<something before "mono"
|
||||
// alphabetically>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
// Note : This file is related to z_vismono, the original name was probably z_vis<something after "mono" alphabetically>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_800BB0A0/func_800BB0A0.s")
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
u8 D_8012D200[] = {
|
||||
0, 1, 2, 3, 4, 5, 6,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
void func_800D2E30(UnkRumbleStruct* arg0) {
|
||||
s32 i;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <global.h>
|
||||
#include <vt.h>
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
|
||||
extern PadMgr gPadMgr;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_800DACC0/pad_800DACB0.s")
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
|
||||
// like audio_load in sm64, but completely rewritten
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_800EC960/func_800EC960.s")
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_800F7260/func_800F7260.s")
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_800F9280/func_800F9280.s")
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <z64.h>
|
||||
#include "global.h"
|
||||
|
||||
#define printSpStatus(x, name) \
|
||||
if (x & SP_STATUS_##name) \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
typedef void (*arg3_800FC868)(void*);
|
||||
typedef void (*arg3_800FC8D8)(void*, u32);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include <fp.h>
|
||||
#include "global.h"
|
||||
#include "fp.h"
|
||||
|
||||
s32 use_cfrac;
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
// The latest generated random number, used to generate the next number in the sequence.
|
||||
static u32 sRandInt = 1;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
// fmodf?
|
||||
f32 func_801067F0(f32 arg0, f32 arg1) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
// memset used in __osMalloc, z_quake, z_view, and z_camera
|
||||
void* func_80106860(void* ptr, s32 val, size_t size) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
// memcpy used in __osMalloc.c
|
||||
void* func_801068B0(void* dst, void* src, size_t size) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_80110450/func_80110450.s")
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B3B50.s")
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
#define LOG_SEVERITY_NOLOG 0
|
||||
#define LOG_SEVERITY_ERROR 2
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
#include <ultra64.h>
|
||||
#include <ultra64/controller.h>
|
||||
#include <ultra64/hardware.h>
|
||||
#include <global.h>
|
||||
#include <alloca.h>
|
||||
#include <vt.h>
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "alloca.h"
|
||||
|
||||
// data
|
||||
const char* sExceptionNames[] = {
|
||||
|
@ -72,7 +69,8 @@ void Fault_ProcessClientContext(FaultClientContext* ctx) {
|
|||
|
||||
if (sFaultStructPtr->currClientThreadSp != 0) {
|
||||
thread = alloca(sizeof(OSThread));
|
||||
osCreateThread(thread, 2, Fault_ClientProcessThread, ctx, sFaultStructPtr->currClientThreadSp, 0x7E);
|
||||
osCreateThread(thread, 2, Fault_ClientProcessThread, ctx, sFaultStructPtr->currClientThreadSp,
|
||||
OS_PRIORITY_APPMAX - 1);
|
||||
osStartThread(thread);
|
||||
} else {
|
||||
Fault_ClientProcessThread(ctx);
|
||||
|
@ -287,9 +285,9 @@ u32 Fault_WaitForInputImpl() {
|
|||
Fault_Sleep(0x10);
|
||||
Fault_UpdatePadImpl();
|
||||
|
||||
kDown = curInput->press.in.button;
|
||||
kDown = curInput->press.button;
|
||||
|
||||
if (kDown == L_TRIG) {
|
||||
if (kDown == BTN_L) {
|
||||
sFaultStructPtr->faultActive = !sFaultStructPtr->faultActive;
|
||||
}
|
||||
|
||||
|
@ -298,19 +296,19 @@ u32 Fault_WaitForInputImpl() {
|
|||
return false;
|
||||
}
|
||||
} else {
|
||||
if (kDown == A_BUTTON || kDown == R_JPAD) {
|
||||
if (kDown == BTN_A || kDown == BTN_DRIGHT) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (kDown == L_JPAD) {
|
||||
if (kDown == BTN_DLEFT) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (kDown == U_JPAD) {
|
||||
if (kDown == BTN_DUP) {
|
||||
FaultDrawer_SetOsSyncPrintfEnabled(true);
|
||||
}
|
||||
|
||||
if (kDown == D_JPAD) {
|
||||
if (kDown == BTN_DDOWN) {
|
||||
FaultDrawer_SetOsSyncPrintfEnabled(false);
|
||||
}
|
||||
}
|
||||
|
@ -557,8 +555,8 @@ void Fault_WaitForButtonCombo() {
|
|||
Fault_Sleep(0x10);
|
||||
Fault_UpdatePadImpl();
|
||||
|
||||
kDown = curInput->press.in.button;
|
||||
kCur = curInput->cur.in.button;
|
||||
kDown = curInput->press.button;
|
||||
kCur = curInput->cur.button;
|
||||
|
||||
if ((kCur == 0) && (s1 == s2)) {
|
||||
s1 = 0;
|
||||
|
@ -569,20 +567,20 @@ void Fault_WaitForButtonCombo() {
|
|||
|
||||
switch (state) {
|
||||
case 0:
|
||||
if (kCur == (Z_TRIG | L_TRIG | R_TRIG) && kDown == Z_TRIG) {
|
||||
if (kCur == (BTN_Z | BTN_L | BTN_R) && kDown == BTN_Z) {
|
||||
state = s2;
|
||||
s1 = s2;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (kDown == U_JPAD) {
|
||||
if (kDown == BTN_DUP) {
|
||||
state = 2;
|
||||
} else {
|
||||
state = 0;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (kDown == D_CBUTTONS) {
|
||||
if (kDown == BTN_CDOWN) {
|
||||
state = 3;
|
||||
s1 = s2;
|
||||
} else {
|
||||
|
@ -590,14 +588,14 @@ void Fault_WaitForButtonCombo() {
|
|||
}
|
||||
break;
|
||||
case 3:
|
||||
if (kDown == U_CBUTTONS) {
|
||||
if (kDown == BTN_CUP) {
|
||||
state = 4;
|
||||
} else {
|
||||
state = 0;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (kDown == D_JPAD) {
|
||||
if (kDown == BTN_DDOWN) {
|
||||
state = 5;
|
||||
s1 = s2;
|
||||
} else {
|
||||
|
@ -605,14 +603,14 @@ void Fault_WaitForButtonCombo() {
|
|||
}
|
||||
break;
|
||||
case 5:
|
||||
if (kDown == L_JPAD) {
|
||||
if (kDown == BTN_DLEFT) {
|
||||
state = 6;
|
||||
} else {
|
||||
state = 0;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (kDown == L_CBUTTONS) {
|
||||
if (kDown == BTN_CLEFT) {
|
||||
state = 7;
|
||||
s1 = s2;
|
||||
} else {
|
||||
|
@ -620,14 +618,14 @@ void Fault_WaitForButtonCombo() {
|
|||
}
|
||||
break;
|
||||
case 7:
|
||||
if (kDown == R_CBUTTONS) {
|
||||
if (kDown == BTN_CRIGHT) {
|
||||
state = 8;
|
||||
} else {
|
||||
state = 0;
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
if (kDown == R_JPAD) {
|
||||
if (kDown == BTN_DRIGHT) {
|
||||
state = 9;
|
||||
s1 = s2;
|
||||
} else {
|
||||
|
@ -635,32 +633,32 @@ void Fault_WaitForButtonCombo() {
|
|||
}
|
||||
break;
|
||||
case 9:
|
||||
if (kDown == (A_BUTTON | B_BUTTON)) {
|
||||
if (kDown == (BTN_A | BTN_B)) {
|
||||
state = 10;
|
||||
} else if (kDown == A_BUTTON) {
|
||||
} else if (kDown == BTN_A) {
|
||||
state = 0x5B;
|
||||
} else if (kDown == B_BUTTON) {
|
||||
} else if (kDown == BTN_B) {
|
||||
state = 0x5C;
|
||||
} else {
|
||||
state = 0;
|
||||
}
|
||||
break;
|
||||
case 0x5B:
|
||||
if (kDown == B_BUTTON) {
|
||||
if (kDown == BTN_B) {
|
||||
state = 10;
|
||||
} else {
|
||||
state = 0;
|
||||
}
|
||||
break;
|
||||
case 0x5C:
|
||||
if (kDown == A_BUTTON) {
|
||||
if (kDown == BTN_A) {
|
||||
state = 10;
|
||||
} else {
|
||||
state = 0;
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
if (kDown == START_BUTTON) {
|
||||
if (kDown == BTN_START) {
|
||||
state = 11;
|
||||
} else {
|
||||
state = 0;
|
||||
|
@ -733,7 +731,7 @@ void Fault_DrawMemDump(u32 pc, u32 sp, u32 unk0, u32 unk1) {
|
|||
count--;
|
||||
Fault_Sleep(0x10);
|
||||
Fault_UpdatePadImpl();
|
||||
if (CHECK_PAD(curInput->press, L_TRIG)) {
|
||||
if (CHECK_BTN_ALL(curInput->press.button, BTN_L)) {
|
||||
sFaultStructPtr->faultActive = false;
|
||||
}
|
||||
}
|
||||
|
@ -741,40 +739,40 @@ void Fault_DrawMemDump(u32 pc, u32 sp, u32 unk0, u32 unk1) {
|
|||
do {
|
||||
Fault_Sleep(0x10);
|
||||
Fault_UpdatePadImpl();
|
||||
} while (curInput->press.in.button == 0);
|
||||
} while (curInput->press.button == 0);
|
||||
|
||||
if (CHECK_PAD(curInput->press, START_BUTTON) || CHECK_PAD(curInput->cur, A_BUTTON)) {
|
||||
if (CHECK_BTN_ALL(curInput->press.button, BTN_START) || CHECK_BTN_ALL(curInput->cur.button, BTN_A)) {
|
||||
return;
|
||||
}
|
||||
|
||||
off = 0x10;
|
||||
if (CHECK_PAD(curInput->cur, Z_TRIG)) {
|
||||
if (CHECK_BTN_ALL(curInput->cur.button, BTN_Z)) {
|
||||
off = 0x100;
|
||||
}
|
||||
|
||||
if (CHECK_PAD(curInput->cur, B_BUTTON)) {
|
||||
if (CHECK_BTN_ALL(curInput->cur.button, BTN_B)) {
|
||||
off <<= 8;
|
||||
}
|
||||
|
||||
if (CHECK_PAD(curInput->press, U_JPAD)) {
|
||||
if (CHECK_BTN_ALL(curInput->press.button, BTN_DUP)) {
|
||||
addr -= off;
|
||||
}
|
||||
if (CHECK_PAD(curInput->press, D_JPAD)) {
|
||||
if (CHECK_BTN_ALL(curInput->press.button, BTN_DDOWN)) {
|
||||
addr += off;
|
||||
}
|
||||
if (CHECK_PAD(curInput->press, U_CBUTTONS)) {
|
||||
if (CHECK_BTN_ALL(curInput->press.button, BTN_CUP)) {
|
||||
addr = pc;
|
||||
}
|
||||
if (CHECK_PAD(curInput->press, D_CBUTTONS)) {
|
||||
if (CHECK_BTN_ALL(curInput->press.button, BTN_CDOWN)) {
|
||||
addr = sp;
|
||||
}
|
||||
if (CHECK_PAD(curInput->press, L_CBUTTONS)) {
|
||||
if (CHECK_BTN_ALL(curInput->press.button, BTN_CLEFT)) {
|
||||
addr = unk0;
|
||||
}
|
||||
if (CHECK_PAD(curInput->press, R_CBUTTONS)) {
|
||||
if (CHECK_BTN_ALL(curInput->press.button, BTN_CRIGHT)) {
|
||||
addr = unk1;
|
||||
}
|
||||
} while (!CHECK_PAD(curInput->press, L_TRIG));
|
||||
} while (!CHECK_BTN_ALL(curInput->press.button, BTN_L));
|
||||
|
||||
sFaultStructPtr->faultActive = true;
|
||||
}
|
||||
|
@ -1023,7 +1021,7 @@ void Fault_SetFB(void* fb, u16 w, u16 h) {
|
|||
FaultDrawer_SetDrawerFB(fb, w, h);
|
||||
}
|
||||
|
||||
void Fault_Start(void) {
|
||||
void Fault_Init(void) {
|
||||
sFaultStructPtr = &gFaultStruct;
|
||||
bzero(sFaultStructPtr, sizeof(FaultThreadStruct));
|
||||
FaultDrawer_SetDefault();
|
||||
|
@ -1038,7 +1036,8 @@ void Fault_Start(void) {
|
|||
gFaultStruct.faultHandlerEnabled = true;
|
||||
osCreateMesgQueue(&sFaultStructPtr->queue, &sFaultStructPtr->msg, 1);
|
||||
StackCheck_Init(&sFaultThreadInfo, &sFaultStack, sFaultStack + sizeof(sFaultStack), 0, 0x100, "fault");
|
||||
osCreateThread(&sFaultStructPtr->thread, 2, &Fault_ThreadEntry, 0, sFaultStack + sizeof(sFaultStack), 0x7f);
|
||||
osCreateThread(&sFaultStructPtr->thread, 2, &Fault_ThreadEntry, 0, sFaultStack + sizeof(sFaultStack),
|
||||
OS_PRIORITY_APPMAX);
|
||||
osStartThread(&sFaultStructPtr->thread);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include <vt.h>
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
|
||||
// rodata
|
||||
const u32 sFaultDrawerFont[] = {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <global.h>
|
||||
#include <ultra64/controller.h>
|
||||
#include "global.h"
|
||||
|
||||
void FlagSet_Update(GlobalContext* globalCtx) {
|
||||
static s32 entryIdx = 0;
|
||||
|
@ -76,35 +75,35 @@ void FlagSet_Update(GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
if (CHECK_PAD(input->press, L_JPAD)) {
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_DLEFT)) {
|
||||
timer = 10;
|
||||
curBit++;
|
||||
}
|
||||
if (CHECK_PAD(input->press, R_JPAD)) {
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_DRIGHT)) {
|
||||
curBit--;
|
||||
timer = 10;
|
||||
}
|
||||
|
||||
if (timer == 0) {
|
||||
if (CHECK_PAD(input->cur, L_JPAD)) {
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_DLEFT)) {
|
||||
curBit++;
|
||||
timer = 2;
|
||||
}
|
||||
if (CHECK_PAD(input->cur, R_JPAD)) {
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_DRIGHT)) {
|
||||
curBit--;
|
||||
timer = 2;
|
||||
}
|
||||
}
|
||||
|
||||
curBit %= 16;
|
||||
if (CHECK_PAD(input->press, U_JPAD)) {
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_DUP)) {
|
||||
entryIdx--;
|
||||
if (entryIdx < 0) {
|
||||
entryIdx = 0;
|
||||
}
|
||||
timer = 10;
|
||||
}
|
||||
if (CHECK_PAD(input->press, D_JPAD)) {
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_DDOWN)) {
|
||||
timer = 10;
|
||||
entryIdx++;
|
||||
if (!entries[entryIdx].value) {
|
||||
|
@ -113,14 +112,14 @@ void FlagSet_Update(GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (timer == 0) {
|
||||
if (CHECK_PAD(input->cur, U_JPAD)) {
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_DUP)) {
|
||||
entryIdx--;
|
||||
timer = 2;
|
||||
if (entryIdx < 0) {
|
||||
entryIdx = 0;
|
||||
}
|
||||
}
|
||||
if (CHECK_PAD(input->cur, D_JPAD)) {
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_DDOWN)) {
|
||||
timer = 2;
|
||||
entryIdx++;
|
||||
if (!entries[entryIdx].value) {
|
||||
|
@ -129,7 +128,7 @@ void FlagSet_Update(GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
if (CHECK_PAD(input->press, A_BUTTON)) {
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_A)) {
|
||||
*entries[entryIdx].value ^= (1 << curBit);
|
||||
}
|
||||
|
||||
|
@ -145,7 +144,7 @@ void FlagSet_Update(GlobalContext* globalCtx) {
|
|||
oGfxCtx->polyOpa.p = gfx;
|
||||
}
|
||||
|
||||
if (CHECK_PAD(input->press, L_TRIG)) {
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_L)) {
|
||||
globalCtx->pauseCtx.flag = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
|
||||
typedef struct {
|
||||
|
@ -77,17 +77,17 @@ void func_800C4344(GameState* gameState) {
|
|||
if (HREG(80) == 0xC) {
|
||||
selectedInput = &gameState->input[HREG(81) < 4U ? HREG(81) : 0];
|
||||
hReg82 = HREG(82);
|
||||
HREG(83) = selectedInput->cur.in.button;
|
||||
HREG(84) = selectedInput->press.in.button;
|
||||
HREG(85) = selectedInput->rel.in.x;
|
||||
HREG(86) = selectedInput->rel.in.y;
|
||||
HREG(87) = selectedInput->rel.in.x;
|
||||
HREG(88) = selectedInput->rel.in.y;
|
||||
HREG(89) = selectedInput->cur.in.x;
|
||||
HREG(90) = selectedInput->cur.in.y;
|
||||
HREG(93) = (selectedInput->cur.in.button == hReg82);
|
||||
HREG(94) = CHECK_PAD(selectedInput->cur, hReg82);
|
||||
HREG(95) = CHECK_PAD(selectedInput->press, hReg82);
|
||||
HREG(83) = selectedInput->cur.button;
|
||||
HREG(84) = selectedInput->press.button;
|
||||
HREG(85) = selectedInput->rel.stick_x;
|
||||
HREG(86) = selectedInput->rel.stick_y;
|
||||
HREG(87) = selectedInput->rel.stick_x;
|
||||
HREG(88) = selectedInput->rel.stick_y;
|
||||
HREG(89) = selectedInput->cur.stick_x;
|
||||
HREG(90) = selectedInput->cur.stick_y;
|
||||
HREG(93) = (selectedInput->cur.button == hReg82);
|
||||
HREG(94) = CHECK_BTN_ALL(selectedInput->cur.button, hReg82);
|
||||
HREG(95) = CHECK_BTN_ALL(selectedInput->press.button, hReg82);
|
||||
}
|
||||
|
||||
if (D_8012DBC0 != 0) {
|
||||
|
@ -158,7 +158,7 @@ void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx) {
|
|||
GameState_SetFBFilter(&newDList);
|
||||
}
|
||||
|
||||
sLastButtonPressed = gameState->input[0].press.in.button | gameState->input[0].cur.in.button;
|
||||
sLastButtonPressed = gameState->input[0].press.button | gameState->input[0].cur.button;
|
||||
if (R_DISABLE_INPUT_DISPLAY == 0) {
|
||||
GameState_DrawInputDisplay(sLastButtonPressed, &newDList);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
void GameAlloc_Log(GameAlloc* this) {
|
||||
GameAllocEntry* iter;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
// .bss
|
||||
u8 D_801755F0;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#include <global.h>
|
||||
#include <ultra64/hardware.h>
|
||||
#include <ultra64/controller.h>
|
||||
#include <vt.h>
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
|
||||
#define GFXPOOL_HEAD_MAGIC 0x1234
|
||||
#define GFXPOOL_TAIL_MAGIC 0x5678
|
||||
|
@ -392,8 +390,8 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
|
|||
sGraphUpdateTime = time;
|
||||
}
|
||||
|
||||
if (D_8012DBC0 && CHECK_PAD(gameState->input[0].press, Z_TRIG) &&
|
||||
CHECK_PAD(gameState->input[0].cur, L_TRIG | R_TRIG)) {
|
||||
if (D_8012DBC0 && CHECK_BTN_ALL(gameState->input[0].press.button, BTN_Z) &&
|
||||
CHECK_BTN_ALL(gameState->input[0].cur.button, BTN_L | BTN_R)) {
|
||||
gSaveContext.gameMode = 0;
|
||||
SET_NEXT_GAMESTATE(gameState, Select_Init, SelectContext);
|
||||
gameState->running = false;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <global.h>
|
||||
#include <vt.h>
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
|
||||
volatile u32 gIrqMgrResetStatus = 0;
|
||||
vu32 gIrqMgrResetStatus = 0;
|
||||
volatile OSTime sIrqMgrResetTime = 0;
|
||||
volatile OSTime gIrqMgrRetraceTime = 0;
|
||||
u32 sIrqMgrRetraceCount = 0;
|
||||
|
@ -212,7 +212,7 @@ void IrqMgr_ThreadEntry(void* arg0) {
|
|||
osSyncPrintf("IRQマネージャスレッド実行終了\n"); // End of IRQ manager thread execution
|
||||
}
|
||||
|
||||
void IrqMgr_Create(IrqMgr* this, void* stack, OSPri pri, u8 retraceCount) {
|
||||
void IrqMgr_Init(IrqMgr* this, void* stack, OSPri pri, u8 retraceCount) {
|
||||
LogUtils_CheckNullPointer("this", this, "../irqmgr.c", 346);
|
||||
LogUtils_CheckNullPointer("stack", stack, "../irqmgr.c", 347);
|
||||
this->clients = NULL;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
u8* sJpegBitStreamPtr;
|
||||
u32 sJpegBitStreamByteIdx;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
void JpegUtils_ProcessQuantizationTable(u8* dqt, JpegQuantizationTable* qt, u8 count) {
|
||||
u8 i;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
ListAlloc* ListAlloc_Init(ListAlloc* this) {
|
||||
this->prev = NULL;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
void* Overlay_AllocateAndLoad(u32 vRomStart, u32 vRomEnd, void* vRamStart, void* vRamEnd) {
|
||||
void* allocatedVRamAddr;
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
s32 gOverlayLogSeverity = 2;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <global.h>
|
||||
#include <vt.h>
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
|
||||
s32 gScreenWidth = SCREEN_WIDTH;
|
||||
s32 gScreenHeight = SCREEN_HEIGHT;
|
||||
|
@ -48,7 +48,7 @@ void Main(void* arg0) {
|
|||
gScreenHeight = SCREEN_HEIGHT;
|
||||
gAppNmiBufferPtr = (PreNmiBuff*)osAppNmiBuffer;
|
||||
PreNmiBuff_Init(gAppNmiBufferPtr);
|
||||
Fault_Start();
|
||||
Fault_Init();
|
||||
SysCfb_Init(0);
|
||||
sysHeap = (u32)gSystemHeap;
|
||||
fb = SysCfb_GetFbPtr(0);
|
||||
|
@ -75,26 +75,26 @@ void Main(void* arg0) {
|
|||
|
||||
osCreateMesgQueue(&irqMgrMsgQ, irqMgrMsgBuf, 0x3c);
|
||||
StackCheck_Init(&sIrqMgrStackInfo, sIrqMgrStack, sIrqMgrStack + sizeof(sIrqMgrStack), 0, 0x100, "irqmgr");
|
||||
IrqMgr_Create(&gIrqMgr, &sGraphStackInfo, 0x11, 1);
|
||||
IrqMgr_Init(&gIrqMgr, &sGraphStackInfo, Z_PRIORITY_IRQMGR, 1);
|
||||
|
||||
osSyncPrintf("タスクスケジューラの初期化\n"); // Initialize the task scheduler
|
||||
StackCheck_Init(&sSchedStackInfo, sSchedStack, sSchedStack + sizeof(sSchedStack), 0, 0x100, "sched");
|
||||
Sched_Init(&gSchedContext, &sAudioStack, 0xf, D_80013960, 1, &gIrqMgr);
|
||||
Sched_Init(&gSchedContext, &sAudioStack, Z_PRIORITY_SCHED, D_80013960, 1, &gIrqMgr);
|
||||
|
||||
IrqMgr_AddClient(&gIrqMgr, &irqClient, &irqMgrMsgQ);
|
||||
|
||||
StackCheck_Init(&sAudioStackInfo, sAudioStack, sAudioStack + sizeof(sAudioStack), 0, 0x100, "audio");
|
||||
AudioMgr_Start(&gAudioMgr, sAudioStack + sizeof(sAudioStack), 0xc, 0xa, &gSchedContext, &gIrqMgr);
|
||||
AudioMgr_Init(&gAudioMgr, sAudioStack + sizeof(sAudioStack), Z_PRIORITY_AUDIOMGR, 0xa, &gSchedContext, &gIrqMgr);
|
||||
|
||||
StackCheck_Init(&sPadMgrStackInfo, sPadMgrStack, sPadMgrStack + sizeof(sPadMgrStack), 0, 0x100, "padmgr");
|
||||
PadMgr_Init(&gPadMgr, &sSiIntMsgQ, &gIrqMgr, 7, 0xe, &sIrqMgrStack);
|
||||
PadMgr_Init(&gPadMgr, &sSiIntMsgQ, &gIrqMgr, 7, Z_PRIORITY_PADMGR, &sIrqMgrStack);
|
||||
|
||||
AudioMgr_Unlock(&gAudioMgr);
|
||||
|
||||
StackCheck_Init(&sGraphStackInfo, sGraphStack, sGraphStack + sizeof(sGraphStack), 0, 0x100, "graph");
|
||||
osCreateThread(&sGraphThread, 4, Graph_ThreadEntry, arg0, sGraphStack + sizeof(sGraphStack), 0xb);
|
||||
osCreateThread(&sGraphThread, 4, Graph_ThreadEntry, arg0, sGraphStack + sizeof(sGraphStack), Z_PRIORITY_GRAPH);
|
||||
osStartThread(&sGraphThread);
|
||||
osSetThreadPri(0, 0xf);
|
||||
osSetThreadPri(0, Z_PRIORITY_SCHED);
|
||||
|
||||
while (true) {
|
||||
msg = NULL;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
OSPfs sMempakPfsHandle;
|
||||
s32 sMempakFreeBytes;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
void MtxConv_F2L(MatrixInternal* m1, MtxF* m2) {
|
||||
s32 i;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#include <ultra64.h>
|
||||
#include <ultra64/controller.h>
|
||||
#include <global.h>
|
||||
#include <vt.h>
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
|
||||
s32 D_8012D280 = 1;
|
||||
|
||||
|
@ -206,7 +204,7 @@ void PadMgr_RumbleSet(PadMgr* padmgr, u8* ctrlrRumbles) {
|
|||
void PadMgr_ProcessInputs(PadMgr* padmgr) {
|
||||
s32 i;
|
||||
Input* input;
|
||||
PadState* padnow1; // original name
|
||||
OSContPad* padnow1; // original name
|
||||
s32 buttonDiff;
|
||||
|
||||
PadMgr_LockPadData(padmgr);
|
||||
|
@ -237,9 +235,9 @@ void PadMgr_ProcessInputs(PadMgr* padmgr) {
|
|||
osSyncPrintf(VT_RST);
|
||||
break;
|
||||
case 8:
|
||||
input->cur.in.button = 0;
|
||||
input->cur.in.x = 0;
|
||||
input->cur.in.y = 0;
|
||||
input->cur.button = 0;
|
||||
input->cur.stick_x = 0;
|
||||
input->cur.stick_y = 0;
|
||||
input->cur.errno = padnow1->errno;
|
||||
if (padmgr->ctrlrIsConnected[i]) {
|
||||
padmgr->ctrlrIsConnected[i] = false;
|
||||
|
@ -255,12 +253,12 @@ void PadMgr_ProcessInputs(PadMgr* padmgr) {
|
|||
Fault_AddHungupAndCrash("../padmgr.c", 397);
|
||||
}
|
||||
|
||||
buttonDiff = input->prev.in.button ^ input->cur.in.button;
|
||||
input->press.in.button |= (u16)(buttonDiff & input->cur.in.button);
|
||||
input->rel.in.button |= (u16)(buttonDiff & input->prev.in.button);
|
||||
buttonDiff = input->prev.button ^ input->cur.button;
|
||||
input->press.button |= (u16)(buttonDiff & input->cur.button);
|
||||
input->rel.button |= (u16)(buttonDiff & input->prev.button);
|
||||
PadUtils_UpdateRelXY(input);
|
||||
input->press.in.x += (s8)(input->cur.in.x - input->prev.in.x);
|
||||
input->press.in.y += (s8)(input->cur.in.y - input->prev.in.y);
|
||||
input->press.stick_x += (s8)(input->cur.stick_x - input->prev.stick_x);
|
||||
input->press.stick_y += (s8)(input->cur.stick_y - input->prev.stick_y);
|
||||
}
|
||||
|
||||
PadMgr_UnlockPadData(padmgr);
|
||||
|
@ -333,19 +331,19 @@ void PadMgr_RequestPadData(PadMgr* padmgr, Input* inputs, s32 mode) {
|
|||
for (i = 0; i < 4; i++) {
|
||||
if (mode != 0) {
|
||||
*newInput = *ogInput;
|
||||
ogInput->press.in.button = 0;
|
||||
ogInput->press.in.x = 0;
|
||||
ogInput->press.in.y = 0;
|
||||
ogInput->rel.in.button = 0;
|
||||
ogInput->press.button = 0;
|
||||
ogInput->press.stick_x = 0;
|
||||
ogInput->press.stick_y = 0;
|
||||
ogInput->rel.button = 0;
|
||||
} else {
|
||||
newInput->prev = newInput->cur;
|
||||
newInput->cur = ogInput->cur;
|
||||
buttonDiff = newInput->prev.in.button ^ newInput->cur.in.button;
|
||||
newInput->press.in.button = newInput->cur.in.button & buttonDiff;
|
||||
newInput->rel.in.button = newInput->prev.in.button & buttonDiff;
|
||||
buttonDiff = newInput->prev.button ^ newInput->cur.button;
|
||||
newInput->press.button = newInput->cur.button & buttonDiff;
|
||||
newInput->rel.button = newInput->prev.button & buttonDiff;
|
||||
PadUtils_UpdateRelXY(newInput);
|
||||
newInput->press.in.x += (s8)(newInput->cur.in.x - newInput->prev.in.x);
|
||||
newInput->press.in.y += (s8)(newInput->cur.in.y - newInput->prev.in.y);
|
||||
newInput->press.stick_x += (s8)(newInput->cur.stick_x - newInput->prev.stick_x);
|
||||
newInput->press.stick_y += (s8)(newInput->cur.stick_y - newInput->prev.stick_y);
|
||||
}
|
||||
ogInput++;
|
||||
newInput++;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
s32 PadSetup_Init(OSMesgQueue* mq, u8* outMask, OSContStatus* status) {
|
||||
s32 ret;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
void PadUtils_Init(Input* input) {
|
||||
bzero(input, sizeof(Input));
|
||||
|
@ -8,53 +8,53 @@ void func_800FCB70() {
|
|||
}
|
||||
|
||||
void PadUtils_ResetPressRel(Input* input) {
|
||||
input->press.in.button = 0;
|
||||
input->rel.in.button = 0;
|
||||
input->press.button = 0;
|
||||
input->rel.button = 0;
|
||||
}
|
||||
|
||||
u32 PadUtils_CheckCurExact(Input* input, u16 value) {
|
||||
return value == input->cur.in.button;
|
||||
return value == input->cur.button;
|
||||
}
|
||||
|
||||
u32 PadUtils_CheckCur(Input* input, u16 key) {
|
||||
return key == (input->cur.in.button & key);
|
||||
return key == (input->cur.button & key);
|
||||
}
|
||||
|
||||
u32 PadUtils_CheckPressed(Input* input, u16 key) {
|
||||
return key == (input->press.in.button & key);
|
||||
return key == (input->press.button & key);
|
||||
}
|
||||
|
||||
u32 PadUtils_CheckReleased(Input* input, u16 key) {
|
||||
return key == (input->rel.in.button & key);
|
||||
return key == (input->rel.button & key);
|
||||
}
|
||||
|
||||
u16 PadUtils_GetCurButton(Input* input) {
|
||||
return input->cur.in.button;
|
||||
return input->cur.button;
|
||||
}
|
||||
|
||||
u16 PadUtils_GetPressButton(Input* input) {
|
||||
return input->press.in.button;
|
||||
return input->press.button;
|
||||
}
|
||||
|
||||
s8 PadUtils_GetCurX(Input* input) {
|
||||
return input->cur.in.x;
|
||||
return input->cur.stick_x;
|
||||
}
|
||||
|
||||
s8 PadUtils_GetCurY(Input* input) {
|
||||
return input->cur.in.y;
|
||||
return input->cur.stick_y;
|
||||
}
|
||||
|
||||
void PadUtils_SetRelXY(Input* input, s32 x, s32 y) {
|
||||
input->rel.in.x = x;
|
||||
input->rel.in.y = y;
|
||||
input->rel.stick_x = x;
|
||||
input->rel.stick_y = y;
|
||||
}
|
||||
|
||||
s8 PadUtils_GetRelXImpl(Input* input) {
|
||||
return input->rel.in.x;
|
||||
return input->rel.stick_x;
|
||||
}
|
||||
|
||||
s8 PadUtils_GetRelYImpl(Input* input) {
|
||||
return input->rel.in.y;
|
||||
return input->rel.stick_y;
|
||||
}
|
||||
|
||||
s8 PadUtils_GetRelX(Input* input) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
void PrintUtils_VPrintf(char** arg0, const char* fmt, va_list args) {
|
||||
_Printf(*arg0, arg0, fmt, args);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
void Overlay_Relocate(void* allocatedVRamAddress, OverlayRelocationSection* overlayInfo, void* vRamAddress) {
|
||||
u32 sections[4];
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
#define RSP_DONE_MSG 667
|
||||
#define RDP_DONE_MSG 668
|
||||
#define ENTRY_MSG 670
|
||||
|
||||
// data
|
||||
volatile s32 sLogScheduler = false;
|
||||
vs32 sLogScheduler = false;
|
||||
|
||||
// bss
|
||||
OSTime sRSPGFXStartTime;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
s32 D_8012CED0 = 0;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
void Sleep_Cycles(OSTime cycles) {
|
||||
OSMesgQueue mq;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include <vt.h>
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
|
||||
volatile OSTime D_8016A520;
|
||||
volatile OSTime D_8016A528;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
u32 sSysCfbFbPtr[2];
|
||||
u32 sSysCfbEnd;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <global.h>
|
||||
#include <math.h>
|
||||
#include "global.h"
|
||||
|
||||
f32 sFactorialTbl[] = { 1.0f, 1.0f, 2.0f, 6.0f, 24.0f, 120.0f, 720.0f,
|
||||
5040.0f, 40320.0f, 362880.0f, 3628800.0f, 39916800.0f, 479001600.0f };
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include <vt.h>
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
|
||||
s32 Math3D_LineSegMakePerpLineSeg(Vec3f* lineAPointA, Vec3f* lineAPointB, Vec3f* lineBPointA, Vec3f* lineBPointB,
|
||||
Vec3f* lineAIntersect, Vec3f* lineBIntersect);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <global.h>
|
||||
#include <math.h>
|
||||
#include "global.h"
|
||||
|
||||
u16 sATan2Tbl[] = {
|
||||
0x0000, 0x000A, 0x0014, 0x001F, 0x0029, 0x0033, 0x003D, 0x0047, 0x0051, 0x005C, 0x0066, 0x0070, 0x007A, 0x0084,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
// clang-format off
|
||||
Mtx gMtxClear = {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
u32 D_8012DBA0 = (u32)&D_80155F50;
|
||||
u32 D_8012DBA4 = (u32)&D_80157580;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
#define LOG_SEVERITY_NOLOG 0
|
||||
#define LOG_SEVERITY_ERROR 2
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
void TitleSetup_InitImpl(GameState* gameState) {
|
||||
// Zelda common data initalization
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
#define F3DZEX_CONST(name) \
|
||||
{ name, #name }
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include <vt.h>
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
|
||||
void Overlay_LoadGameState(GameStateOverlay* overlayEntry) {
|
||||
if (overlayEntry->loadedRamAddr != NULL) {
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include <vt.h>
|
||||
#include "overlays/actors/ovl_Arms_Hook/z_arms_hook.h"
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
|
||||
#include "overlays/actors/ovl_Arms_Hook/z_arms_hook.h"
|
||||
#include "overlays/actors/ovl_En_Part/z_en_part.h"
|
||||
|
||||
void ActorShape_Init(ActorShape* shape, f32 arg1, void* shadowDrawFunc, f32 arg3) {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include <initvars.h>
|
||||
#include "global.h"
|
||||
#include "initvars.h"
|
||||
|
||||
#define ACTOR_OVERLAY(name, allocType) \
|
||||
{ \
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80038600.s")
|
||||
|
||||
|
@ -23,7 +22,7 @@ void func_800387FC(u32 uParm1, u32* puParm2) {
|
|||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003880C.s")
|
||||
|
||||
void func_80038870(int iParm1) {
|
||||
void func_80038870(s32 iParm1) {
|
||||
*(u32*)(iParm1 + 4) = 0;
|
||||
}
|
||||
|
||||
|
@ -31,9 +30,9 @@ u32 func_80038878(s32 iParm1) {
|
|||
u32 uVar1;
|
||||
|
||||
uVar1 = *(u32*)(iParm1 + 4) & 0xffff;
|
||||
*(int*)(iParm1 + 4) = *(u32*)(iParm1 + 4) + 1;
|
||||
*(s32*)(iParm1 + 4) = *(u32*)(iParm1 + 4) + 1;
|
||||
|
||||
if (*(int*)(iParm1 + 8) <= (int)uVar1) {
|
||||
if (*(s32*)(iParm1 + 8) <= (s32)uVar1) {
|
||||
return 0xffff;
|
||||
}
|
||||
|
||||
|
@ -200,7 +199,7 @@ void func_8003E6E4(u16* a0) {
|
|||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003E750.s")
|
||||
|
||||
void func_8003E804(int iParm1) {
|
||||
void func_8003E804(s32 iParm1) {
|
||||
func_8003E5B4(iParm1 + 0x14, iParm1 + 0x34);
|
||||
}
|
||||
|
||||
|
@ -231,7 +230,7 @@ void func_8003E8EC(u32 uParm1, u32* iParm2) {
|
|||
iParm2[0x0C] = iParm2[0x14];
|
||||
|
||||
|
||||
//int i;
|
||||
//s32 i;
|
||||
//for (i = 0; i < 4; i++) {
|
||||
//iParm2[0x06 + (i * 2)] = iParm2[0x0E + (i * 2)];
|
||||
//iParm2[0x07 + (i * 2)] = iParm2[0x0D + (i * 2)];
|
||||
|
@ -239,7 +238,7 @@ void func_8003E8EC(u32 uParm1, u32* iParm2) {
|
|||
}
|
||||
*/
|
||||
|
||||
u32 func_8003E934(int iParm1) {
|
||||
u32 func_8003E934(s32 iParm1) {
|
||||
if (!((-1 < iParm1) && (iParm1 < 0x32))) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -338,13 +337,13 @@ void func_800418D0(CollisionContext* colCtx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
void func_80041978(int iParm1, int iParm2) {
|
||||
void func_80041978(s32 iParm1, s32 iParm2) {
|
||||
u8* puVar1;
|
||||
|
||||
puVar1 = *(u8**)(iParm1 + 8);
|
||||
if (puVar1 < puVar1 + iParm2) {
|
||||
*puVar1 = 0;
|
||||
while (puVar1++ < (u8*)(*(int*)(iParm1 + 8) + iParm2)) {
|
||||
while (puVar1++ < (u8*)(*(s32*)(iParm1 + 8) + iParm2)) {
|
||||
*puVar1 = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include <vt.h>
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
|
||||
typedef struct {
|
||||
s16 val;
|
||||
|
@ -3328,19 +3327,19 @@ s32 func_80058D34(Camera* camera) {
|
|||
|
||||
if (D_8011D394 == 0) {
|
||||
if (camera->globalCtx->activeCamera == 0) {
|
||||
if (CHECK_PAD(D_8015BD7C->state.input[2].press, U_CBUTTONS)) {
|
||||
if (CHECK_BTN_ALL(D_8015BD7C->state.input[2].press.button, BTN_CUP)) {
|
||||
osSyncPrintf("attention sound URGENCY\n");
|
||||
func_80078884(NA_SE_SY_ATTENTION_URGENCY);
|
||||
}
|
||||
if (CHECK_PAD(D_8015BD7C->state.input[2].press, D_CBUTTONS)) {
|
||||
if (CHECK_BTN_ALL(D_8015BD7C->state.input[2].press.button, BTN_CDOWN)) {
|
||||
osSyncPrintf("attention sound NORMAL\n");
|
||||
func_80078884(NA_SE_SY_ATTENTION_ON);
|
||||
}
|
||||
|
||||
if (CHECK_PAD(D_8015BD7C->state.input[2].press, R_CBUTTONS)) {
|
||||
if (CHECK_BTN_ALL(D_8015BD7C->state.input[2].press.button, BTN_CRIGHT)) {
|
||||
phi_a2 = 1;
|
||||
}
|
||||
if (CHECK_PAD(D_8015BD7C->state.input[2].press, L_CBUTTONS)) {
|
||||
if (CHECK_BTN_ALL(D_8015BD7C->state.input[2].press.button, BTN_CLEFT)) {
|
||||
phi_a2 = -1;
|
||||
}
|
||||
if (phi_a2 != 0) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
void Gfx_DrawDListOpa(GlobalContext* globalCtx, Gfx* dlist) {
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_cheap_proc.c", 214);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
DamageTable D_8011DB20[] = {
|
||||
{ {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include <vt.h>
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
|
||||
// draw red poly
|
||||
void func_8005B280(GraphicsContext* gfx, Vec3f* vA, Vec3f* vB, Vec3f* vC) {
|
||||
|
@ -497,7 +496,7 @@ s32 Collider_DestroyTrisItemDim(GlobalContext* globalCtx, TriNorm* dim) {
|
|||
s32 Collider_SetTrisItemDim(GlobalContext* globalCtx, TriNorm* dest, ColliderTrisItemDimInit* src) {
|
||||
Vec3f* d;
|
||||
Vec3f* s;
|
||||
float nx, ny, nz, nd;
|
||||
f32 nx, ny, nz, nd;
|
||||
|
||||
d = dest->vtx;
|
||||
s = src->vtx;
|
||||
|
@ -1981,6 +1980,7 @@ void CollisionCheck_AC_CylVsQuad(GlobalContext* globalCtx, CollisionCheckContext
|
|||
}
|
||||
|
||||
static s8 sBssDummy1;
|
||||
static s8 sBssDummy2;
|
||||
|
||||
static TriNorm D_8015E3A0;
|
||||
static TriNorm D_8015E3D8;
|
||||
|
@ -2032,10 +2032,10 @@ void CollisionCheck_AC_QuadVsCyl(GlobalContext* globalCtx, CollisionCheckContext
|
|||
}
|
||||
}
|
||||
|
||||
static s8 sBssDummy2;
|
||||
static s8 sBssDummy3;
|
||||
static s8 sBssDummy4;
|
||||
static s8 sBssDummy5;
|
||||
static s8 sBssDummy6;
|
||||
|
||||
static Vec3f D_8015E420;
|
||||
|
||||
|
@ -2077,10 +2077,10 @@ void CollisionCheck_AC_TrisVsTris(GlobalContext* globalCtx, CollisionCheckContex
|
|||
}
|
||||
}
|
||||
|
||||
static s8 sBssDummy6;
|
||||
static s8 sBssDummy7;
|
||||
static s8 sBssDummy8;
|
||||
static s8 sBssDummy9;
|
||||
static s8 sBssDummy10;
|
||||
|
||||
static Vec3f D_8015E430;
|
||||
static TriNorm D_8015E440;
|
||||
|
@ -2676,7 +2676,7 @@ void func_80061F64(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, C
|
|||
u32 flags;
|
||||
s32 i;
|
||||
f32 damage;
|
||||
int tblLookup;
|
||||
s32 tblLookup;
|
||||
|
||||
if (collider->actor == NULL || !(collider->acFlags & 2)) {
|
||||
return;
|
||||
|
@ -2910,10 +2910,10 @@ void func_8006285C(GlobalContext* globalCtx, ColliderTris* collider, s32 index,
|
|||
// In order to reproduce this behavior, we need a specific number of bss variables in the file before that point.
|
||||
// For this, we introduce a certain amount of dummy variables throughout the file, which we fit inside padding added
|
||||
// by the compiler between structs like TriNorm and/or Vec3f, so they don't take space in bss.
|
||||
static s8 sBssDummy10;
|
||||
static s8 sBssDummy11;
|
||||
static s8 sBssDummy12;
|
||||
static s8 sBssDummy13;
|
||||
static s8 sBssDummy14;
|
||||
|
||||
void func_800628A4(s32 arg0, ColliderJntSph* collider) {
|
||||
static Vec3f D_8015E648;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
SaveContext gSaveContext;
|
||||
u32 D_8015FA88;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
void func_80110990(GlobalContext* globalCtx) {
|
||||
Map_Destroy(globalCtx);
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <ultra64/controller.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
typedef struct {
|
||||
u8 x;
|
||||
|
@ -15,7 +13,7 @@ typedef struct {
|
|||
} InputCombo;
|
||||
|
||||
GameInfo* gGameInfo;
|
||||
int D_8015FA94; // no known symbols
|
||||
s32 D_8015FA94; // no known symbols
|
||||
PrintTextBuffer D_8015FA98[0x16];
|
||||
|
||||
s16 D_8011E0B0 = 0; // PrintTextBuffer index
|
||||
|
@ -25,14 +23,12 @@ Color_RGBA8 printTextColors[] = {
|
|||
};
|
||||
|
||||
InputCombo inputCombos[REG_GROUPS] = {
|
||||
{ L_TRIG, U_CBUTTONS }, { L_TRIG, L_CBUTTONS }, { L_TRIG, D_CBUTTONS }, { L_TRIG, A_BUTTON },
|
||||
{ R_TRIG, D_CBUTTONS }, { L_TRIG, R_CBUTTONS }, { L_TRIG, R_TRIG }, { L_TRIG, L_JPAD },
|
||||
{ L_TRIG, R_JPAD }, { L_TRIG, U_JPAD }, { L_TRIG, B_BUTTON }, { L_TRIG, Z_TRIG },
|
||||
{ L_TRIG, D_JPAD }, { R_TRIG, A_BUTTON }, { R_TRIG, B_BUTTON }, { R_TRIG, Z_TRIG },
|
||||
{ R_TRIG, L_TRIG }, { R_TRIG, U_CBUTTONS }, { R_TRIG, R_CBUTTONS }, { R_TRIG, L_JPAD },
|
||||
{ R_TRIG, L_CBUTTONS }, { R_TRIG, START_BUTTON }, { L_TRIG, START_BUTTON }, { R_TRIG, R_JPAD },
|
||||
{ R_TRIG, U_JPAD }, { START_BUTTON, R_TRIG }, { START_BUTTON, A_BUTTON }, { START_BUTTON, B_BUTTON },
|
||||
{ START_BUTTON, R_CBUTTONS },
|
||||
{ BTN_L, BTN_CUP }, { BTN_L, BTN_CLEFT }, { BTN_L, BTN_CDOWN }, { BTN_L, BTN_A }, { BTN_R, BTN_CDOWN },
|
||||
{ BTN_L, BTN_CRIGHT }, { BTN_L, BTN_R }, { BTN_L, BTN_DLEFT }, { BTN_L, BTN_DRIGHT }, { BTN_L, BTN_DUP },
|
||||
{ BTN_L, BTN_B }, { BTN_L, BTN_Z }, { BTN_L, BTN_DDOWN }, { BTN_R, BTN_A }, { BTN_R, BTN_B },
|
||||
{ BTN_R, BTN_Z }, { BTN_R, BTN_L }, { BTN_R, BTN_CUP }, { BTN_R, BTN_CRIGHT }, { BTN_R, BTN_DLEFT },
|
||||
{ BTN_R, BTN_CLEFT }, { BTN_R, BTN_START }, { BTN_L, BTN_START }, { BTN_R, BTN_DRIGHT }, { BTN_R, BTN_DUP },
|
||||
{ BTN_START, BTN_R }, { BTN_START, BTN_A }, { BTN_START, BTN_B }, { BTN_START, BTN_CRIGHT },
|
||||
};
|
||||
|
||||
char regChar[] = " SOPQMYDUIZCNKXcsiWAVHGmnBdkb";
|
||||
|
@ -114,11 +110,12 @@ void func_8006390C(Input* input) {
|
|||
s32 i;
|
||||
|
||||
regGroup = (gGameInfo->regGroup * REG_PAGES + gGameInfo->regPage) * REG_PER_PAGE - REG_PER_PAGE;
|
||||
dpad = input->cur.in.button & (U_JPAD | L_JPAD | R_JPAD | D_JPAD);
|
||||
if (CHECK_PAD(input->cur, L_TRIG) || CHECK_PAD(input->cur, R_TRIG) || CHECK_PAD(input->cur, START_BUTTON)) {
|
||||
dpad = input->cur.button & (BTN_DUP | BTN_DLEFT | BTN_DRIGHT | BTN_DDOWN);
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_L) || CHECK_BTN_ALL(input->cur.button, BTN_R) ||
|
||||
CHECK_BTN_ALL(input->cur.button, BTN_START)) {
|
||||
input_combo = inputCombos;
|
||||
for (i = 0; i < REG_GROUPS; i++) {
|
||||
if (~(~input_combo->push | input->cur.in.button) || ~(~input_combo->held | input->press.in.button)) {
|
||||
if (~(~input_combo->push | input->cur.button) || ~(~input_combo->held | input->press.button)) {
|
||||
input_combo++;
|
||||
} else {
|
||||
break;
|
||||
|
@ -154,25 +151,27 @@ void func_8006390C(Input* input) {
|
|||
gGameInfo->dpadLast = dpad;
|
||||
}
|
||||
|
||||
increment =
|
||||
(dpad & R_JPAD)
|
||||
? (CHECK_PAD(input->cur, A_BUTTON | B_BUTTON)
|
||||
? 1000
|
||||
: CHECK_PAD(input->cur, A_BUTTON) ? 100 : CHECK_PAD(input->cur, B_BUTTON) ? 10 : 1)
|
||||
: (dpad & L_JPAD)
|
||||
? (CHECK_PAD(input->cur, A_BUTTON | B_BUTTON)
|
||||
? -1000
|
||||
: CHECK_PAD(input->cur, A_BUTTON) ? -100
|
||||
: CHECK_PAD(input->cur, B_BUTTON) ? -10 : -1)
|
||||
: 0;
|
||||
increment = (CHECK_BTN_ANY(dpad, BTN_DRIGHT))
|
||||
? (CHECK_BTN_ALL(input->cur.button, BTN_A | BTN_B)
|
||||
? 1000
|
||||
: CHECK_BTN_ALL(input->cur.button, BTN_A)
|
||||
? 100
|
||||
: CHECK_BTN_ALL(input->cur.button, BTN_B) ? 10 : 1)
|
||||
: (CHECK_BTN_ANY(dpad, BTN_DLEFT))
|
||||
? (CHECK_BTN_ALL(input->cur.button, BTN_A | BTN_B)
|
||||
? -1000
|
||||
: CHECK_BTN_ALL(input->cur.button, BTN_A)
|
||||
? -100
|
||||
: CHECK_BTN_ALL(input->cur.button, BTN_B) ? -10 : -1)
|
||||
: 0;
|
||||
|
||||
gGameInfo->data[gGameInfo->regCur + regGroup] += increment;
|
||||
if (dpad & U_JPAD) {
|
||||
if (CHECK_BTN_ANY(dpad, BTN_DUP)) {
|
||||
gGameInfo->regCur--;
|
||||
if (gGameInfo->regCur < 0) {
|
||||
gGameInfo->regCur = REG_PER_PAGE - 1;
|
||||
}
|
||||
} else if (dpad & D_JPAD) {
|
||||
} else if (CHECK_BTN_ANY(dpad, BTN_DDOWN)) {
|
||||
gGameInfo->regCur++;
|
||||
if (gGameInfo->regCur >= REG_PER_PAGE) {
|
||||
gGameInfo->regCur = 0;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 drawType; // indicates which draw function to use when displaying the object
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <ultra64/controller.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
u16 D_8011E1C0 = 0;
|
||||
u16 D_8011E1C4 = 0;
|
||||
|
@ -98,14 +96,15 @@ void func_80064558(GlobalContext* globalCtx, CutsceneContext* csCtx) {
|
|||
void func_800645A0(GlobalContext* globalCtx, CutsceneContext* csCtx) {
|
||||
Input* pad1 = &globalCtx->state.input[0];
|
||||
|
||||
if (CHECK_PAD(pad1->press, L_JPAD) && (csCtx->state == CS_STATE_IDLE) && (gSaveContext.sceneSetupIndex >= 4)) {
|
||||
if (CHECK_BTN_ALL(pad1->press.button, BTN_DLEFT) && (csCtx->state == CS_STATE_IDLE) &&
|
||||
(gSaveContext.sceneSetupIndex >= 4)) {
|
||||
D_8015FCC8 = 0;
|
||||
gSaveContext.cutsceneIndex = 0xFFFD;
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
}
|
||||
|
||||
if (CHECK_PAD(pad1->press, U_JPAD) && (csCtx->state == CS_STATE_IDLE) && (gSaveContext.sceneSetupIndex >= 4) &&
|
||||
(D_8011D394 == 0)) {
|
||||
if (CHECK_BTN_ALL(pad1->press.button, BTN_DUP) && (csCtx->state == CS_STATE_IDLE) &&
|
||||
(gSaveContext.sceneSetupIndex >= 4) && (D_8011D394 == 0)) {
|
||||
D_8015FCC8 = 1;
|
||||
gSaveContext.cutsceneIndex = 0xFFFD;
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
|
@ -442,15 +441,16 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
|
||||
if ((gSaveContext.gameMode != 0) && (gSaveContext.gameMode != 3) && (globalCtx->sceneNum != SCENE_SPOT00) &&
|
||||
(csCtx->frames > 20) &&
|
||||
(CHECK_PAD(globalCtx->state.input[0].press, A_BUTTON) || CHECK_PAD(globalCtx->state.input[0].press, B_BUTTON) ||
|
||||
CHECK_PAD(globalCtx->state.input[0].press, START_BUTTON)) &&
|
||||
(CHECK_BTN_ALL(globalCtx->state.input[0].press.button, BTN_A) ||
|
||||
CHECK_BTN_ALL(globalCtx->state.input[0].press.button, BTN_B) ||
|
||||
CHECK_BTN_ALL(globalCtx->state.input[0].press.button, BTN_START)) &&
|
||||
(gSaveContext.fileNum != 0xFEDC) && (globalCtx->sceneLoadFlag == 0)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_PIECE_OF_HEART, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
temp = 1;
|
||||
}
|
||||
|
||||
if ((csCtx->frames == cmd->startFrame) || (temp != 0) ||
|
||||
((csCtx->frames > 20) && CHECK_PAD(globalCtx->state.input[0].press, START_BUTTON) &&
|
||||
((csCtx->frames > 20) && CHECK_BTN_ALL(globalCtx->state.input[0].press.button, BTN_START) &&
|
||||
(gSaveContext.fileNum != 0xFEDC))) {
|
||||
csCtx->state = CS_STATE_UNSKIPPABLE_EXEC;
|
||||
func_800F68BC(0);
|
||||
|
@ -1522,7 +1522,7 @@ void Cutscene_ProcessCommands(GlobalContext* globalCtx, CutsceneContext* csCtx,
|
|||
return;
|
||||
}
|
||||
|
||||
if (CHECK_PAD(globalCtx->state.input[0].press, R_JPAD)) {
|
||||
if (CHECK_BTN_ALL(globalCtx->state.input[0].press.button, BTN_DRIGHT)) {
|
||||
csCtx->state = CS_STATE_UNSKIPPABLE_INIT;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
// "Get Item" Model Draw Functions
|
||||
void func_800694E4(GlobalContext* globalCtx, s16 drawId);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
void EffectBlure_AddVertex(EffectBlure* this, Vec3f* p1, Vec3f* p2) {
|
||||
EffectBlureElement* elem;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include <vt.h>
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
|
||||
static Vtx sVertices[5] = {
|
||||
VTX(-32, -32, 0, 0, 1024, 0xFF, 0xFF, 0xFF, 0xFF),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
// original name: "spark"
|
||||
void EffectSpark_Init(void* thisx, void* initParamsx) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
void func_80026230(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 arg3) {
|
||||
f32 cos;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
EffectContext sEffectContext;
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include <vt.h>
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
|
||||
EffectSsInfo sEffectSsInfo = { 0 }; // "EffectSS2Info"
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include <initvars.h>
|
||||
#include "global.h"
|
||||
#include "initvars.h"
|
||||
|
||||
#define EFFECT_SS_OVERLAY(name) \
|
||||
{ \
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
#include "overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.h"
|
||||
#include "overlays/effects/ovl_Effect_Ss_KiraKira/z_eff_ss_kirakira.h"
|
||||
#include "overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.h"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
// TODO: use macros to define elf messages once the format is fully documented
|
||||
ElfMessage sChildSariaMsgs[] = {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
|
||||
#define FLAGS 0x00000010
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
#include "overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h"
|
||||
|
||||
#define FLAGS 0x00000000
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
u16 sReactionTextIds[][PLAYER_MASK_MAX] = {
|
||||
{ 0x0000, 0x7124, 0x7127, 0x7126, 0x7125, 0x7127, 0x7124, 0x7125, 0x7127 },
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "global.h"
|
||||
|
||||
Gfx D_8012AFB0[] = {
|
||||
gsDPPipeSync(),
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue