mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-13 11:24:40 +00:00
Merge branch 'main' into doc_pause_menu
This commit is contained in:
commit
ae8034422e
603 changed files with 11123 additions and 8708 deletions
16
Makefile
16
Makefile
|
@ -98,7 +98,7 @@ OBJDUMP := $(MIPS_BINUTILS_PREFIX)objdump
|
||||||
EMULATOR ?=
|
EMULATOR ?=
|
||||||
EMU_FLAGS ?=
|
EMU_FLAGS ?=
|
||||||
|
|
||||||
INC := -Iinclude -Isrc -Ibuild -I.
|
INC := -Iinclude -Iinclude/libc -Isrc -Ibuild -I.
|
||||||
|
|
||||||
# Check code syntax with host compiler
|
# Check code syntax with host compiler
|
||||||
CHECK_WARNINGS := -Wall -Wextra -Wno-format-security -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-variable -Wno-missing-braces
|
CHECK_WARNINGS := -Wall -Wextra -Wno-format-security -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-variable -Wno-missing-braces
|
||||||
|
@ -316,10 +316,13 @@ build/data/%.o: data/%.s
|
||||||
build/assets/text/%.enc.h: assets/text/%.h assets/text/charmap.txt
|
build/assets/text/%.enc.h: assets/text/%.h assets/text/charmap.txt
|
||||||
python3 tools/msgenc.py assets/text/charmap.txt $< $@
|
python3 tools/msgenc.py assets/text/charmap.txt $< $@
|
||||||
|
|
||||||
|
# Dependencies for files including message data headers
|
||||||
|
# TODO remove when full header dependencies are used.
|
||||||
build/assets/text/fra_message_data_static.o: build/assets/text/message_data.enc.h
|
build/assets/text/fra_message_data_static.o: build/assets/text/message_data.enc.h
|
||||||
build/assets/text/ger_message_data_static.o: build/assets/text/message_data.enc.h
|
build/assets/text/ger_message_data_static.o: build/assets/text/message_data.enc.h
|
||||||
build/assets/text/nes_message_data_static.o: build/assets/text/message_data.enc.h
|
build/assets/text/nes_message_data_static.o: build/assets/text/message_data.enc.h
|
||||||
build/assets/text/staff_message_data_static.o: build/assets/text/message_data_staff.enc.h
|
build/assets/text/staff_message_data_static.o: build/assets/text/message_data_staff.enc.h
|
||||||
|
build/src/code/z_message_PAL.o: build/assets/text/message_data.enc.h build/assets/text/message_data_staff.enc.h
|
||||||
|
|
||||||
build/assets/%.o: assets/%.c
|
build/assets/%.o: assets/%.c
|
||||||
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
|
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
|
||||||
|
@ -331,9 +334,20 @@ build/src/%.o: src/%.s
|
||||||
build/dmadata_table_spec.h: build/$(SPEC)
|
build/dmadata_table_spec.h: build/$(SPEC)
|
||||||
$(MKDMADATA) $< $@
|
$(MKDMADATA) $< $@
|
||||||
|
|
||||||
|
# Dependencies for files that may include the dmadata header automatically generated from the spec file
|
||||||
build/src/boot/z_std_dma.o: build/dmadata_table_spec.h
|
build/src/boot/z_std_dma.o: build/dmadata_table_spec.h
|
||||||
build/src/dmadata/dmadata.o: build/dmadata_table_spec.h
|
build/src/dmadata/dmadata.o: build/dmadata_table_spec.h
|
||||||
|
|
||||||
|
# Dependencies for files including from include/tables/
|
||||||
|
# TODO remove when full header dependencies are used.
|
||||||
|
build/src/code/graph.o: include/tables/gamestate_table.h
|
||||||
|
build/src/code/object_table.o: include/tables/object_table.h
|
||||||
|
build/src/code/z_actor.o: include/tables/actor_table.h # so uses of ACTOR_ID_MAX update when the table length changes
|
||||||
|
build/src/code/z_actor_dlftbls.o: include/tables/actor_table.h
|
||||||
|
build/src/code/z_effect_soft_sprite_dlftbls.o: include/tables/effect_ss_table.h
|
||||||
|
build/src/code/z_game_dlftbls.o: include/tables/gamestate_table.h
|
||||||
|
build/src/code/z_scene_table.o: include/tables/scene_table.h include/tables/entrance_table.h
|
||||||
|
|
||||||
build/src/%.o: src/%.c
|
build/src/%.o: src/%.c
|
||||||
$(CC_CHECK) $<
|
$(CC_CHECK) $<
|
||||||
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
|
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
|
||||||
|
|
|
@ -638,19 +638,19 @@ void func_80A87F44(Actor* thisx, PlayState* play);
|
||||||
void func_80A87BEC(EnJj* this, PlayState* play);
|
void func_80A87BEC(EnJj* this, PlayState* play);
|
||||||
void func_80A87C30(EnJj* this, PlayState* play);
|
void func_80A87C30(EnJj* this, PlayState* play);
|
||||||
|
|
||||||
/*
|
#if 0
|
||||||
ActorInit En_Jj_InitVars = {
|
ActorInit En_Jj_InitVars = {
|
||||||
ACTOR_EN_JJ,
|
/**/ ACTOR_EN_JJ,
|
||||||
ACTORTYPE_ITEMACTION,
|
/**/ ACTORTYPE_ITEMACTION,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_JJ,
|
/**/ OBJECT_JJ,
|
||||||
sizeof(EnJj),
|
/**/ sizeof(EnJj),
|
||||||
(ActorFunc)EnJj_Init,
|
/**/ EnJj_Init,
|
||||||
(ActorFunc)EnJj_Destroy,
|
/**/ EnJj_Destroy,
|
||||||
(ActorFunc)EnJj_Update,
|
/**/ EnJj_Update,
|
||||||
(ActorFunc)EnJj_Draw,
|
/**/ EnJj_Draw,
|
||||||
};
|
};
|
||||||
*/
|
#endif
|
||||||
|
|
||||||
extern ColliderCylinderInit D_80A88CB4;
|
extern ColliderCylinderInit D_80A88CB4;
|
||||||
// static ColliderCylinderInit sCylinderInit = {
|
// static ColliderCylinderInit sCylinderInit = {
|
||||||
|
|
|
@ -94,15 +94,15 @@ s32 D_80B18910[] = { 0x0A000039, 0x20010000, 0x00000000, 0x00000000, 0x00000000,
|
||||||
s32 D_80B1893C[] = { 0x00000000, 0x00000000, 0xFF000000 };
|
s32 D_80B1893C[] = { 0x00000000, 0x00000000, 0xFF000000 };
|
||||||
|
|
||||||
ActorInit En_Tg_InitVars = {
|
ActorInit En_Tg_InitVars = {
|
||||||
ACTOR_EN_TG,
|
/**/ ACTOR_EN_TG,
|
||||||
ACTORTYPE_NPC,
|
/**/ ACTORTYPE_NPC,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_MU,
|
/**/ OBJECT_MU,
|
||||||
sizeof(EnTg),
|
/**/ sizeof(EnTg),
|
||||||
(ActorFunc)EnTg_Init,
|
/**/ EnTg_Init,
|
||||||
(ActorFunc)EnTg_Destroy,
|
/**/ EnTg_Destroy,
|
||||||
(ActorFunc)EnTg_Update,
|
/**/ EnTg_Update,
|
||||||
(ActorFunc)EnTg_Draw,
|
/**/ EnTg_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
s32 D_80B18968[] = { 0x00000000, 0x44480000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 };
|
s32 D_80B18968[] = { 0x00000000, 0x44480000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 };
|
||||||
|
@ -325,10 +325,10 @@ ovl_En_Jj: Rom 00E3E3D0:00E3F9E0 VRam 80A87800:80A88E10 Offset 000964
|
||||||
static CutsceneData D_80A88164[] = {
|
static CutsceneData D_80A88164[] = {
|
||||||
CS_BEGIN_CUTSCENE(26, 1629),
|
CS_BEGIN_CUTSCENE(26, 1629),
|
||||||
CS_PLAYER_CUE_LIST(4),
|
CS_PLAYER_CUE_LIST(4),
|
||||||
CS_PLAYER_CUE(0x0005, 0, 240, 0x0000, 0x4000, 0x0000, -1732, 52, -44, -1732, 52, -44, 1.1393037197548209e-29f, 0.0f, 1.401298464324817e-45f),
|
CS_PLAYER_CUE(PLAYER_CUEID_5, 0, 240, 0x0000, 0x4000, 0x0000, -1732, 52, -44, -1732, 52, -44, 1.1393037197548209e-29f, 0.0f, 1.401298464324817e-45f),
|
||||||
CS_PLAYER_CUE(0x0003, 240, 255, 0x0000, 0x4000, 0x0000, -1732, 52, -44, -1732, 52, -44, 1.1393037197548209e-29f, 0.0f, 1.401298464324817e-45f),
|
CS_PLAYER_CUE(PLAYER_CUEID_3, 240, 255, 0x0000, 0x4000, 0x0000, -1732, 52, -44, -1732, 52, -44, 1.1393037197548209e-29f, 0.0f, 1.401298464324817e-45f),
|
||||||
CS_PLAYER_CUE(0x0006, 255, 285, 0x0000, 0x4000, 0x0000, -1732, 52, -44, -1732, 52, -44, 1.1393037197548209e-29f, 0.0f, 1.401298464324817e-45f),
|
CS_PLAYER_CUE(PLAYER_CUEID_6, 255, 285, 0x0000, 0x4000, 0x0000, -1732, 52, -44, -1732, 52, -44, 1.1393037197548209e-29f, 0.0f, 1.401298464324817e-45f),
|
||||||
CS_PLAYER_CUE(0x0020, 285, 300, 0x0000, 0xC000, 0x0000, -1732, 52, -44, -1537, 109, -44, 1.1393037197548209e-29f, 0.0f, 1.401298464324817e-45f),
|
CS_PLAYER_CUE(PLAYER_CUEID_32, 285, 300, 0x0000, 0xC000, 0x0000, -1732, 52, -44, -1537, 109, -44, 1.1393037197548209e-29f, 0.0f, 1.401298464324817e-45f),
|
||||||
CS_ACTOR_CUE_LIST(68, 4),
|
CS_ACTOR_CUE_LIST(68, 4),
|
||||||
CS_ACTOR_CUE(0x0001, 0, 234, 0x0000, 0x4000, 0x0000, -1665, 52, -44, -1665, 52, -44, 1.1393037197548209e-29f, 0.0f, 1.401298464324817e-45f),
|
CS_ACTOR_CUE(0x0001, 0, 234, 0x0000, 0x4000, 0x0000, -1665, 52, -44, -1665, 52, -44, 1.1393037197548209e-29f, 0.0f, 1.401298464324817e-45f),
|
||||||
CS_ACTOR_CUE(0x0002, 234, 241, 0x41F8, 0x0000, 0x0000, -1665, 52, -44, -1603, 130, -47, 8.857142448425293f, 11.142857551574707f, -8.857142448425293f),
|
CS_ACTOR_CUE(0x0002, 234, 241, 0x41F8, 0x0000, 0x0000, -1665, 52, -44, -1603, 130, -47, 8.857142448425293f, 11.142857551574707f, -8.857142448425293f),
|
||||||
|
@ -348,7 +348,7 @@ static CutsceneData D_80A88164[] = {
|
||||||
CS_MISC(0x000C, 1095, 1161, 0x0000, 0x00000000, 0xFFFFFFD2, 0x00000000, 0xFFFFFFD0, 0xFFFFFFD2, 0x00000000, 0xFFFFFFD0, 0x00000000, 0x00000000, 0x00000000),
|
CS_MISC(0x000C, 1095, 1161, 0x0000, 0x00000000, 0xFFFFFFD2, 0x00000000, 0xFFFFFFD0, 0xFFFFFFD2, 0x00000000, 0xFFFFFFD0, 0x00000000, 0x00000000, 0x00000000),
|
||||||
CS_TRANSITION(0x0009, 0, 10),
|
CS_TRANSITION(0x0009, 0, 10),
|
||||||
CS_PLAYER_CUE_LIST(1),
|
CS_PLAYER_CUE_LIST(1),
|
||||||
CS_PLAYER_CUE(0x0035, 300, 1629, 0x0000, 0x0000, 0x0000, -1630, 52, -52, -1630, 52, -52, 0.0f, 0.0f, 0.0f),
|
CS_PLAYER_CUE(PLAYER_CUEID_53, 300, 1629, 0x0000, 0x0000, 0x0000, -1630, 52, -52, -1630, 52, -52, 0.0f, 0.0f, 0.0f),
|
||||||
CS_CAM_EYE_SPLINE(0, 1091),
|
CS_CAM_EYE_SPLINE(0, 1091),
|
||||||
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, 45.39994430541992f, -1641, 95, -41, 0x015C),
|
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, 45.39994430541992f, -1641, 95, -41, 0x015C),
|
||||||
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, 45.39994430541992f, -1641, 95, -41, 0x016D),
|
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, 45.39994430541992f, -1641, 95, -41, 0x016D),
|
||||||
|
@ -490,15 +490,15 @@ To replace the `extern`, because the data is in a separate file, we include the
|
||||||
Lastly, uncomment the InitVars block that's been sitting there the whole time. The data section of the file now looks like
|
Lastly, uncomment the InitVars block that's been sitting there the whole time. The data section of the file now looks like
|
||||||
```C
|
```C
|
||||||
ActorInit En_Jj_InitVars = {
|
ActorInit En_Jj_InitVars = {
|
||||||
ACTOR_EN_JJ,
|
/**/ ACTOR_EN_JJ,
|
||||||
ACTORTYPE_ITEMACTION,
|
/**/ ACTORTYPE_ITEMACTION,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_JJ,
|
/**/ OBJECT_JJ,
|
||||||
sizeof(EnJj),
|
/**/ sizeof(EnJj),
|
||||||
(ActorFunc)EnJj_Init,
|
/**/ EnJj_Init,
|
||||||
(ActorFunc)EnJj_Destroy,
|
/**/ EnJj_Destroy,
|
||||||
(ActorFunc)EnJj_Update,
|
/**/ EnJj_Update,
|
||||||
(ActorFunc)EnJj_Draw,
|
/**/ EnJj_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "en_jj_cutscene_data.c" EARLY
|
#include "en_jj_cutscene_data.c" EARLY
|
||||||
|
@ -567,15 +567,15 @@ Notice that the numbers in the bottom pane is all shifted one word to the left.
|
||||||
|
|
||||||
```C
|
```C
|
||||||
ActorInit En_Jj_InitVars = {
|
ActorInit En_Jj_InitVars = {
|
||||||
ACTOR_EN_JJ,
|
/**/ ACTOR_EN_JJ,
|
||||||
ACTORTYPE_ITEMACTION,
|
/**/ ACTORTYPE_ITEMACTION,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_JJ,
|
/**/ OBJECT_JJ,
|
||||||
sizeof(EnJj),
|
/**/ sizeof(EnJj),
|
||||||
(ActorFunc)EnJj_Init,
|
/**/ EnJj_Init,
|
||||||
(ActorFunc)EnJj_Destroy,
|
/**/ EnJj_Destroy,
|
||||||
(ActorFunc)EnJj_Update,
|
/**/ EnJj_Update,
|
||||||
(ActorFunc)EnJj_Draw,
|
/**/ EnJj_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
s32 usused = 0;
|
s32 usused = 0;
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
#ifndef ALLOCA_H
|
|
||||||
#define ALLOCA_H
|
|
||||||
|
|
||||||
void* alloca(u32);
|
|
||||||
#define alloca __builtin_alloca
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef ATTRIBUTES_H
|
#ifndef ATTRIBUTES_H
|
||||||
#define ATTRIBUTES_H
|
#define ATTRIBUTES_H
|
||||||
|
|
||||||
#ifndef __GNUC__
|
#if !defined(__GNUC__) && !defined(__attribute__)
|
||||||
#define __attribute__(x)
|
#define __attribute__(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#define FAULT_H
|
#define FAULT_H
|
||||||
|
|
||||||
#include "ultra64.h"
|
#include "ultra64.h"
|
||||||
|
#include "attributes.h"
|
||||||
#include "padmgr.h"
|
#include "padmgr.h"
|
||||||
|
|
||||||
// These are the same as the 3-bit ansi color codes
|
// These are the same as the 3-bit ansi color codes
|
||||||
|
|
34
include/fp.h
34
include/fp.h
|
@ -1,34 +0,0 @@
|
||||||
#ifndef FP_H
|
|
||||||
#define FP_H
|
|
||||||
#include "ultra64.h"
|
|
||||||
|
|
||||||
extern f32 qNaN0x3FFFFF;
|
|
||||||
extern f32 qNaN0x10000;
|
|
||||||
extern f32 sNaN0x3FFFFF;
|
|
||||||
|
|
||||||
f32 floorf(f32 x);
|
|
||||||
f64 floor(f64 x);
|
|
||||||
s32 lfloorf(f32 x);
|
|
||||||
s32 lfloor(f64 x);
|
|
||||||
|
|
||||||
f32 ceilf(f32 x);
|
|
||||||
f64 ceil(f64 x);
|
|
||||||
s32 lceilf(f32 x);
|
|
||||||
s32 lceil(f64 x);
|
|
||||||
|
|
||||||
f32 truncf(f32 x);
|
|
||||||
f64 trunc(f64 x);
|
|
||||||
s32 ltruncf(f32 x);
|
|
||||||
s32 ltrunc(f64 x);
|
|
||||||
|
|
||||||
f32 nearbyintf(f32 x);
|
|
||||||
f64 nearbyint(f64 x);
|
|
||||||
s32 lnearbyintf(f32 x);
|
|
||||||
s32 lnearbyint(f64 x);
|
|
||||||
|
|
||||||
f32 roundf(f32 x);
|
|
||||||
f64 round(f64 x);
|
|
||||||
s32 lroundf(f32 x);
|
|
||||||
s32 lround(f64 x);
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -5,15 +5,21 @@
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
|
|
||||||
f32 fabsf(f32 f);
|
f32 fabsf(f32 f);
|
||||||
#ifndef __sgi
|
#ifdef __sgi
|
||||||
#define fabsf(f) __builtin_fabsf((f32)(f))
|
|
||||||
#else
|
|
||||||
#pragma intrinsic(fabsf)
|
#pragma intrinsic(fabsf)
|
||||||
|
#else
|
||||||
|
#define fabsf(f) __builtin_fabsf((f32)(f))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
f32 sqrtf(f32 f);
|
f32 sqrtf(f32 f);
|
||||||
|
#ifdef __sgi
|
||||||
#pragma intrinsic(sqrtf)
|
#pragma intrinsic(sqrtf)
|
||||||
|
#endif
|
||||||
|
|
||||||
f64 sqrt(f64 f);
|
f64 sqrt(f64 f);
|
||||||
|
#ifdef __sgi
|
||||||
#pragma intrinsic(sqrt)
|
#pragma intrinsic(sqrt)
|
||||||
|
#endif
|
||||||
|
|
||||||
void cleararena(void);
|
void cleararena(void);
|
||||||
void bootproc(void);
|
void bootproc(void);
|
||||||
|
@ -30,12 +36,9 @@ void Locale_ResetRegion(void);
|
||||||
u32 func_80001F48(void);
|
u32 func_80001F48(void);
|
||||||
u32 func_80001F8C(void);
|
u32 func_80001F8C(void);
|
||||||
u32 Locale_IsRegionNative(void);
|
u32 Locale_IsRegionNative(void);
|
||||||
NORETURN void __assert(const char* exp, const char* file, s32 line);
|
|
||||||
void isPrintfInit(void);
|
void isPrintfInit(void);
|
||||||
void osSyncPrintfUnused(const char* fmt, ...);
|
|
||||||
void osSyncPrintf(const char* fmt, ...);
|
|
||||||
void rmonPrintf(const char* fmt, ...);
|
void rmonPrintf(const char* fmt, ...);
|
||||||
void* is_proutSyncPrintf(void* arg, const char* str, u32 count);
|
void* is_proutSyncPrintf(void* arg, const char* str, size_t count);
|
||||||
NORETURN void func_80002384(const char* exp, const char* file, u32 line);
|
NORETURN void func_80002384(const char* exp, const char* file, u32 line);
|
||||||
OSPiHandle* osDriveRomInit(void);
|
OSPiHandle* osDriveRomInit(void);
|
||||||
void Mio0_Decompress(Yaz0Header* hdr, u8* dst);
|
void Mio0_Decompress(Yaz0Header* hdr, u8* dst);
|
||||||
|
@ -57,8 +60,6 @@ void LogUtils_CheckValidPointer(const char* exp, void* ptr, const char* file, s3
|
||||||
void LogUtils_LogThreadId(const char* name, s32 line);
|
void LogUtils_LogThreadId(const char* name, s32 line);
|
||||||
void LogUtils_HungupThread(const char* name, s32 line);
|
void LogUtils_HungupThread(const char* name, s32 line);
|
||||||
void LogUtils_ResetHungup(void);
|
void LogUtils_ResetHungup(void);
|
||||||
s32 vsprintf(char* dst, const char* fmt, va_list args);
|
|
||||||
s32 sprintf(char* dst, const char* fmt, ...);
|
|
||||||
void __osPiCreateAccessQueue(void);
|
void __osPiCreateAccessQueue(void);
|
||||||
void __osPiGetAccess(void);
|
void __osPiGetAccess(void);
|
||||||
void __osPiRelAccess(void);
|
void __osPiRelAccess(void);
|
||||||
|
@ -75,7 +76,6 @@ void __osDispatchThread(void);
|
||||||
void __osCleanupThread(void);
|
void __osCleanupThread(void);
|
||||||
void __osDequeueThread(OSThread** queue, OSThread* thread);
|
void __osDequeueThread(OSThread** queue, OSThread* thread);
|
||||||
void osDestroyThread(OSThread* thread);
|
void osDestroyThread(OSThread* thread);
|
||||||
void bzero(void* __s, s32 __n);
|
|
||||||
void osCreateThread(OSThread* thread, OSId id, void (*entry)(void*), void* arg, void* sp, OSPri pri);
|
void osCreateThread(OSThread* thread, OSId id, void (*entry)(void*), void* arg, void* sp, OSPri pri);
|
||||||
void __osSetSR(u32);
|
void __osSetSR(u32);
|
||||||
u32 __osGetSR(void);
|
u32 __osGetSR(void);
|
||||||
|
@ -92,12 +92,8 @@ void osViSetMode(OSViMode* mode);
|
||||||
u32 __osProbeTLB(void*);
|
u32 __osProbeTLB(void*);
|
||||||
u32 osGetMemSize(void);
|
u32 osGetMemSize(void);
|
||||||
void osSetEventMesg(OSEvent e, OSMesgQueue* mq, OSMesg msg);
|
void osSetEventMesg(OSEvent e, OSMesgQueue* mq, OSMesg msg);
|
||||||
s32 _Printf(PrintCallback, void* arg, const char* fmt, va_list ap);
|
|
||||||
void osUnmapTLBAll(void);
|
void osUnmapTLBAll(void);
|
||||||
s32 osEPiStartDma(OSPiHandle* handle, OSIoMesg* mb, s32 direction);
|
s32 osEPiStartDma(OSPiHandle* handle, OSIoMesg* mb, s32 direction);
|
||||||
const char* strchr(const char* str, s32 ch);
|
|
||||||
u32 strlen(const char* str);
|
|
||||||
void* memcpy(void* dst, const void* src, size_t size);
|
|
||||||
void osInvalICache(void* vaddr, s32 nbytes);
|
void osInvalICache(void* vaddr, s32 nbytes);
|
||||||
void osCreateMesgQueue(OSMesgQueue* mq, OSMesg* msg, s32 count);
|
void osCreateMesgQueue(OSMesgQueue* mq, OSMesg* msg, s32 count);
|
||||||
void osInvalDCache(void* vaddr, s32 nbytes);
|
void osInvalDCache(void* vaddr, s32 nbytes);
|
||||||
|
@ -108,7 +104,6 @@ OSPri osGetThreadPri(OSThread* thread);
|
||||||
s32 __osEPiRawReadIo(OSPiHandle* handle, u32 devAddr, u32* data);
|
s32 __osEPiRawReadIo(OSPiHandle* handle, u32 devAddr, u32* data);
|
||||||
void osViSwapBuffer(void* frameBufPtr);
|
void osViSwapBuffer(void* frameBufPtr);
|
||||||
s32 __osEPiRawStartDma(OSPiHandle* handle, s32 direction, u32 cartAddr, void* dramAddr, size_t size);
|
s32 __osEPiRawStartDma(OSPiHandle* handle, s32 direction, u32 cartAddr, void* dramAddr, size_t size);
|
||||||
u32 bcmp(void* __sl, void* __s2, u32 __n);
|
|
||||||
OSTime osGetTime(void);
|
OSTime osGetTime(void);
|
||||||
void __osTimerServicesInit(void);
|
void __osTimerServicesInit(void);
|
||||||
void __osTimerInterrupt(void);
|
void __osTimerInterrupt(void);
|
||||||
|
@ -116,7 +111,6 @@ void __osSetTimerIntr(OSTime time);
|
||||||
OSTime __osInsertTimer(OSTimer* timer);
|
OSTime __osInsertTimer(OSTimer* timer);
|
||||||
u32 osGetCount(void);
|
u32 osGetCount(void);
|
||||||
void __osSetCompare(u32);
|
void __osSetCompare(u32);
|
||||||
void* bcopy(void* __src, void* __dest, u32 __n);
|
|
||||||
s32 __osDisableInt(void);
|
s32 __osDisableInt(void);
|
||||||
void __osRestoreInt(s32);
|
void __osRestoreInt(s32);
|
||||||
void __osViInit(void);
|
void __osViInit(void);
|
||||||
|
@ -132,10 +126,6 @@ void osMapTLBRdb(void);
|
||||||
void osYieldThread(void);
|
void osYieldThread(void);
|
||||||
u32 __osGetCause(void);
|
u32 __osGetCause(void);
|
||||||
s32 __osEPiRawWriteIo(OSPiHandle* handle, u32 devAddr, u32 data);
|
s32 __osEPiRawWriteIo(OSPiHandle* handle, u32 devAddr, u32 data);
|
||||||
void _Litob(_Pft* args, u8 type);
|
|
||||||
ldiv_t ldiv(s32 num, s32 denom);
|
|
||||||
lldiv_t lldiv(s64 num, s64 denom);
|
|
||||||
void _Ldtob(_Pft* args, u8 type);
|
|
||||||
s32 __osSiRawWriteIo(void* devAddr, u32 val);
|
s32 __osSiRawWriteIo(void* devAddr, u32 val);
|
||||||
void osCreateViManager(OSPri pri);
|
void osCreateViManager(OSPri pri);
|
||||||
OSViContext* __osViGetCurrentContext(void);
|
OSViContext* __osViGetCurrentContext(void);
|
||||||
|
@ -376,17 +366,17 @@ void func_8002DBD0(Actor* actor, Vec3f* dest, Vec3f* pos);
|
||||||
f32 Actor_HeightDiff(Actor* actorA, Actor* actorB);
|
f32 Actor_HeightDiff(Actor* actorA, Actor* actorB);
|
||||||
f32 Player_GetHeight(Player* player);
|
f32 Player_GetHeight(Player* player);
|
||||||
f32 func_8002DCE4(Player* player);
|
f32 func_8002DCE4(Player* player);
|
||||||
s32 func_8002DD6C(Player* player);
|
int func_8002DD6C(Player* player);
|
||||||
s32 func_8002DD78(Player* player);
|
int func_8002DD78(Player* player);
|
||||||
s32 func_8002DDE4(PlayState* play);
|
s32 func_8002DDE4(PlayState* play);
|
||||||
s32 func_8002DDF4(PlayState* play);
|
s32 func_8002DDF4(PlayState* play);
|
||||||
void func_8002DE04(PlayState* play, Actor* actorA, Actor* actorB);
|
void func_8002DE04(PlayState* play, Actor* actorA, Actor* actorB);
|
||||||
void func_8002DE74(PlayState* play, Player* player);
|
void func_8002DE74(PlayState* play, Player* player);
|
||||||
void Actor_MountHorse(PlayState* play, Player* player, Actor* horse);
|
void Actor_MountHorse(PlayState* play, Player* player, Actor* horse);
|
||||||
s32 func_8002DEEC(Player* player);
|
int func_8002DEEC(Player* player);
|
||||||
void func_8002DF18(PlayState* play, Player* player);
|
void func_8002DF18(PlayState* play, Player* player);
|
||||||
s32 func_8002DF38(PlayState* play, Actor* actor, u8 csMode);
|
s32 Player_SetCsAction(PlayState* play, Actor* csActor, u8 csAction);
|
||||||
s32 func_8002DF54(PlayState* play, Actor* actor, u8 csMode);
|
s32 Player_SetCsActionWithHaltedActors(PlayState* play, Actor* csActor, u8 csAction);
|
||||||
void func_8002DF90(DynaPolyActor* dynaActor);
|
void func_8002DF90(DynaPolyActor* dynaActor);
|
||||||
void func_8002DFA4(DynaPolyActor* dynaActor, f32 arg1, s16 arg2);
|
void func_8002DFA4(DynaPolyActor* dynaActor, f32 arg1, s16 arg2);
|
||||||
s32 Player_IsFacingActor(Actor* actor, s16 maxAngle, PlayState* play);
|
s32 Player_IsFacingActor(Actor* actor, s16 maxAngle, PlayState* play);
|
||||||
|
@ -991,10 +981,10 @@ void Path_CopyLastPoint(Path* path, Vec3f* dest);
|
||||||
void FrameAdvance_Init(FrameAdvanceContext* frameAdvCtx);
|
void FrameAdvance_Init(FrameAdvanceContext* frameAdvCtx);
|
||||||
s32 FrameAdvance_Update(FrameAdvanceContext* frameAdvCtx, Input* input);
|
s32 FrameAdvance_Update(FrameAdvanceContext* frameAdvCtx, Input* input);
|
||||||
void Player_SetBootData(PlayState* play, Player* this);
|
void Player_SetBootData(PlayState* play, Player* this);
|
||||||
s32 Player_InBlockingCsMode(PlayState* play, Player* this);
|
int Player_InBlockingCsMode(PlayState* play, Player* this);
|
||||||
s32 Player_InCsMode(PlayState* play);
|
int Player_InCsMode(PlayState* play);
|
||||||
s32 func_8008E9C4(Player* this);
|
s32 func_8008E9C4(Player* this);
|
||||||
s32 Player_IsChildWithHylianShield(Player* this);
|
int Player_IsChildWithHylianShield(Player* this);
|
||||||
s32 Player_ActionToModelGroup(Player* this, s32 itemAction);
|
s32 Player_ActionToModelGroup(Player* this, s32 itemAction);
|
||||||
void Player_SetModelsForHoldingShield(Player* this);
|
void Player_SetModelsForHoldingShield(Player* this);
|
||||||
void Player_SetModels(Player* this, s32 modelGroup);
|
void Player_SetModels(Player* this, s32 modelGroup);
|
||||||
|
@ -1006,19 +996,19 @@ void func_8008EDF0(Player* this);
|
||||||
void func_8008EE08(Player* this);
|
void func_8008EE08(Player* this);
|
||||||
void func_8008EEAC(PlayState* play, Actor* actor);
|
void func_8008EEAC(PlayState* play, Actor* actor);
|
||||||
s32 func_8008EF44(PlayState* play, s32 ammo);
|
s32 func_8008EF44(PlayState* play, s32 ammo);
|
||||||
s32 Player_IsBurningStickInRange(PlayState* play, Vec3f* pos, f32 xzRange, f32 yRange);
|
int Player_IsBurningStickInRange(PlayState* play, Vec3f* pos, f32 xzRange, f32 yRange);
|
||||||
s32 Player_GetStrength(void);
|
s32 Player_GetStrength(void);
|
||||||
u8 Player_GetMask(PlayState* play);
|
u8 Player_GetMask(PlayState* play);
|
||||||
Player* Player_UnsetMask(PlayState* play);
|
Player* Player_UnsetMask(PlayState* play);
|
||||||
s32 Player_HasMirrorShieldEquipped(PlayState* play);
|
s32 Player_HasMirrorShieldEquipped(PlayState* play);
|
||||||
s32 Player_HasMirrorShieldSetToDraw(PlayState* play);
|
int Player_HasMirrorShieldSetToDraw(PlayState* play);
|
||||||
s32 Player_ActionToMagicSpell(Player* this, s32 itemAction);
|
s32 Player_ActionToMagicSpell(Player* this, s32 itemAction);
|
||||||
s32 Player_HoldsHookshot(Player* this);
|
int Player_HoldsHookshot(Player* this);
|
||||||
s32 func_8008F128(Player* this);
|
int func_8008F128(Player* this);
|
||||||
s32 Player_ActionToMeleeWeapon(s32 itemAction);
|
s32 Player_ActionToMeleeWeapon(s32 itemAction);
|
||||||
s32 Player_GetMeleeWeaponHeld(Player* this);
|
s32 Player_GetMeleeWeaponHeld(Player* this);
|
||||||
s32 Player_HoldsTwoHandedWeapon(Player* this);
|
s32 Player_HoldsTwoHandedWeapon(Player* this);
|
||||||
s32 Player_HoldsBrokenKnife(Player* this);
|
int Player_HoldsBrokenKnife(Player* this);
|
||||||
s32 Player_ActionToBottle(Player* this, s32 itemAction);
|
s32 Player_ActionToBottle(Player* this, s32 itemAction);
|
||||||
s32 Player_GetBottleHeld(Player* this);
|
s32 Player_GetBottleHeld(Player* this);
|
||||||
s32 Player_ActionToExplosive(Player* this, s32 itemAction);
|
s32 Player_ActionToExplosive(Player* this, s32 itemAction);
|
||||||
|
@ -1265,7 +1255,7 @@ Gfx* Play_SetFog(PlayState* this, Gfx* gfx);
|
||||||
void Play_Destroy(GameState* thisx);
|
void Play_Destroy(GameState* thisx);
|
||||||
void Play_Init(GameState* thisx);
|
void Play_Init(GameState* thisx);
|
||||||
void Play_Main(GameState* thisx);
|
void Play_Main(GameState* thisx);
|
||||||
s32 Play_InCsMode(PlayState* this);
|
int Play_InCsMode(PlayState* this);
|
||||||
f32 func_800BFCB8(PlayState* this, MtxF* mf, Vec3f* pos);
|
f32 func_800BFCB8(PlayState* this, MtxF* mf, Vec3f* pos);
|
||||||
void* Play_LoadFile(PlayState* this, RomFile* file);
|
void* Play_LoadFile(PlayState* this, RomFile* file);
|
||||||
void Play_GetScreenPos(PlayState* this, Vec3f* src, Vec3f* dest);
|
void Play_GetScreenPos(PlayState* this, Vec3f* src, Vec3f* dest);
|
||||||
|
@ -1287,8 +1277,8 @@ void Play_SaveSceneFlags(PlayState* this);
|
||||||
void Play_SetupRespawnPoint(PlayState* this, s32 respawnMode, s32 playerParams);
|
void Play_SetupRespawnPoint(PlayState* this, s32 respawnMode, s32 playerParams);
|
||||||
void Play_TriggerVoidOut(PlayState* this);
|
void Play_TriggerVoidOut(PlayState* this);
|
||||||
void Play_TriggerRespawn(PlayState* this);
|
void Play_TriggerRespawn(PlayState* this);
|
||||||
s32 Play_CamIsNotFixed(PlayState* this);
|
int Play_CamIsNotFixed(PlayState* this);
|
||||||
s32 FrameAdvance_IsEnabled(PlayState* this);
|
int FrameAdvance_IsEnabled(PlayState* this);
|
||||||
s32 func_800C0D34(PlayState* this, Actor* actor, s16* yaw);
|
s32 func_800C0D34(PlayState* this, Actor* actor, s16* yaw);
|
||||||
s32 func_800C0DB4(PlayState* this, Vec3f* pos);
|
s32 func_800C0DB4(PlayState* this, Vec3f* pos);
|
||||||
void PreRender_SetValuesSave(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf, void* cvg);
|
void PreRender_SetValuesSave(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf, void* cvg);
|
||||||
|
@ -1419,11 +1409,11 @@ s32 Math3D_CylVsTri(Cylinder16* cyl, TriNorm* tri);
|
||||||
s32 Math3D_CylTriVsIntersect(Cylinder16* cyl, TriNorm* tri, Vec3f* intersect);
|
s32 Math3D_CylTriVsIntersect(Cylinder16* cyl, TriNorm* tri, Vec3f* intersect);
|
||||||
s32 Math3D_SphVsSph(Sphere16* sphereA, Sphere16* sphereB);
|
s32 Math3D_SphVsSph(Sphere16* sphereA, Sphere16* sphereB);
|
||||||
s32 Math3D_SphVsSphOverlap(Sphere16* sphereA, Sphere16* sphereB, f32* overlapSize);
|
s32 Math3D_SphVsSphOverlap(Sphere16* sphereA, Sphere16* sphereB, f32* overlapSize);
|
||||||
s32 Math3D_SphVsSphOverlapCenter(Sphere16* sphereA, Sphere16* sphereB, f32* overlapSize, f32* centerDist);
|
s32 Math3D_SphVsSphOverlapCenterDist(Sphere16* sphereA, Sphere16* sphereB, f32* overlapSize, f32* centerDist);
|
||||||
s32 Math3D_SphVsCylOverlapDist(Sphere16* sph, Cylinder16* cyl, f32* overlapSize);
|
s32 Math3D_SphVsCylOverlap(Sphere16* sph, Cylinder16* cyl, f32* overlapSize);
|
||||||
s32 Math3D_SphVsCylOverlapCenterDist(Sphere16* sph, Cylinder16* cyl, f32* overlapSize, f32* centerDist);
|
s32 Math3D_SphVsCylOverlapCenterDist(Sphere16* sph, Cylinder16* cyl, f32* overlapSize, f32* centerDist);
|
||||||
s32 Math3D_CylOutsideCyl(Cylinder16* ca, Cylinder16* cb, f32* deadSpace);
|
s32 Math3D_CylVsCylOverlap(Cylinder16* ca, Cylinder16* cb, f32* overlapSize);
|
||||||
s32 Math3D_CylOutsideCylDist(Cylinder16* ca, Cylinder16* cb, f32* deadSpace, f32* xzDist);
|
s32 Math3D_CylVsCylOverlapCenterDist(Cylinder16* ca, Cylinder16* cb, f32* overlapSize, f32* centerDist);
|
||||||
s32 Math3D_TriVsTriIntersect(TriNorm* ta, TriNorm* tb, Vec3f* intersect);
|
s32 Math3D_TriVsTriIntersect(TriNorm* ta, TriNorm* tb, Vec3f* intersect);
|
||||||
s32 Math3D_XZInSphere(Sphere16* sphere, f32 x, f32 z);
|
s32 Math3D_XZInSphere(Sphere16* sphere, f32 x, f32 z);
|
||||||
s32 Math3D_XYInSphere(Sphere16* sphere, f32 x, f32 y);
|
s32 Math3D_XYInSphere(Sphere16* sphere, f32 x, f32 y);
|
||||||
|
|
9
include/libc/alloca.h
Normal file
9
include/libc/alloca.h
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#ifndef ALLOCA_H
|
||||||
|
#define ALLOCA_H
|
||||||
|
|
||||||
|
#include "stddef.h"
|
||||||
|
|
||||||
|
void* alloca(size_t);
|
||||||
|
#define alloca(size) __builtin_alloca(size)
|
||||||
|
|
||||||
|
#endif
|
45
include/libc/assert.h
Normal file
45
include/libc/assert.h
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
#ifndef ASSERT_H
|
||||||
|
#define ASSERT_H
|
||||||
|
|
||||||
|
#if !defined(__GNUC__) && !defined(__attribute__)
|
||||||
|
#define __attribute__(x)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Runtime assertions
|
||||||
|
|
||||||
|
__attribute__((noreturn)) void __assert(const char* assertion, const char* file, int line);
|
||||||
|
|
||||||
|
// assert for matching
|
||||||
|
#ifndef NDEBUG
|
||||||
|
# ifndef NON_MATCHING
|
||||||
|
# define ASSERT(cond, msg, file, line) ((cond) ? ((void)0) : __assert(msg, file, line))
|
||||||
|
# else
|
||||||
|
# define ASSERT(cond, msg, file, line) ((cond) ? ((void)0) : __assert(#cond, __FILE__, __LINE__))
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# define ASSERT(cond, msg, file, line) ((void)0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// standard assert macro
|
||||||
|
#ifndef NDEBUG
|
||||||
|
# define assert(cond) ASSERT(cond, #cond, __FILE__, __LINE__)
|
||||||
|
#else
|
||||||
|
# define assert(cond) ((void)0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Static/compile-time assertions
|
||||||
|
|
||||||
|
#if defined(__GNUC__) || (__STDC_VERSION__ >= 201112L)
|
||||||
|
# define static_assert(cond, msg) _Static_assert(cond, msg)
|
||||||
|
#else
|
||||||
|
# ifndef GLUE
|
||||||
|
# define GLUE(a, b) a##b
|
||||||
|
# endif
|
||||||
|
# ifndef GLUE2
|
||||||
|
# define GLUE2(a, b) GLUE(a, b)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# define static_assert(cond, msg) typedef char GLUE2(static_assertion_failed, __LINE__)[(cond) ? 1 : -1]
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
|
@ -5,24 +5,37 @@
|
||||||
|
|
||||||
#define M_PI 3.14159265358979323846f
|
#define M_PI 3.14159265358979323846f
|
||||||
#define M_SQRT2 1.41421356237309504880f
|
#define M_SQRT2 1.41421356237309504880f
|
||||||
#define FLT_MAX 340282346638528859811704183484516925440.0f
|
#define MAXFLOAT 3.40282347e+38f
|
||||||
#define SHT_MAX 32767.0f
|
#define SHT_MAX 32767.0f
|
||||||
#define SHT_MINV (1.0f / SHT_MAX)
|
#define SHT_MINV (1.0f / SHT_MAX)
|
||||||
|
|
||||||
typedef union {
|
float floorf(float);
|
||||||
struct {
|
double floor(double);
|
||||||
u32 hi;
|
long lfloorf(float);
|
||||||
u32 lo;
|
long lfloor(double);
|
||||||
} word;
|
|
||||||
|
|
||||||
f64 d;
|
float ceilf(float);
|
||||||
} du;
|
double ceil(double);
|
||||||
|
long lceilf(float);
|
||||||
|
long lceil(double);
|
||||||
|
|
||||||
typedef union {
|
float truncf(float);
|
||||||
u32 i;
|
double trunc(double);
|
||||||
f32 f;
|
long ltruncf(float);
|
||||||
} fu;
|
long ltrunc(double);
|
||||||
|
|
||||||
extern f32 __libm_qnan_f;
|
float nearbyintf(float);
|
||||||
|
double nearbyint(double);
|
||||||
|
long lnearbyintf(float);
|
||||||
|
long lnearbyint(double);
|
||||||
|
|
||||||
|
float roundf(float);
|
||||||
|
double round(double);
|
||||||
|
long lroundf(float);
|
||||||
|
long lround(double);
|
||||||
|
|
||||||
|
extern float qNaN0x3FFFFF;
|
||||||
|
extern float qNaN0x10000;
|
||||||
|
extern float sNaN0x3FFFFF;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,43 +1,57 @@
|
||||||
#ifndef STDARG_H
|
#ifndef STDARG_H
|
||||||
#define STDARG_H
|
#define STDARG_H
|
||||||
|
|
||||||
// When building with GCC, use the official vaarg macros to avoid warnings
|
// When building with GCC, use the official vaarg macros to avoid warnings and possibly bad codegen.
|
||||||
// and possibly bad codegen.
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#define va_list __builtin_va_list
|
|
||||||
|
#define va_list __builtin_va_list
|
||||||
#define va_start __builtin_va_start
|
#define va_start __builtin_va_start
|
||||||
#define va_arg __builtin_va_arg
|
#define va_arg __builtin_va_arg
|
||||||
#define va_end __builtin_va_end
|
#define va_end __builtin_va_end
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
#ifndef _VA_LIST_
|
||||||
|
# define _VA_LIST_
|
||||||
typedef char* va_list;
|
typedef char* va_list;
|
||||||
#define _FP 1
|
#endif
|
||||||
#define _INT 0
|
|
||||||
|
#define _INT 0
|
||||||
|
#define _FP 1
|
||||||
#define _STRUCT 2
|
#define _STRUCT 2
|
||||||
|
|
||||||
#define _VA_FP_SAVE_AREA 0x10
|
#define _VA_FP_SAVE_AREA 0x10
|
||||||
#define _VA_ALIGN(p, a) (((u32)(((char*)p) + ((a) > 4 ? (a) : 4) - 1)) & -((a) > 4 ? (a) : 4))
|
|
||||||
#define va_start(vp, parmN) (vp = ((va_list)&parmN + sizeof(parmN)))
|
|
||||||
|
|
||||||
#define __va_stack_arg(list, mode) \
|
#define _VA_ALIGN(p, a) (((unsigned int)(((char*)p) + ((a) > 4 ? (a) : 4) - 1)) & -((a) > 4 ? (a) : 4))
|
||||||
( \
|
|
||||||
((list) = (char*)_VA_ALIGN(list, __builtin_alignof(mode)) + \
|
|
||||||
_VA_ALIGN(sizeof(mode), 4)), \
|
|
||||||
(((char*)list) - (_VA_ALIGN(sizeof(mode), 4) - sizeof(mode))))
|
|
||||||
|
|
||||||
#define __va_double_arg(list, mode) \
|
#define va_start(list, parmN) (list = ((va_list)&parmN + sizeof(parmN)))
|
||||||
( \
|
|
||||||
(((s32)list & 0x1) /* 1 byte aligned? */ \
|
|
||||||
? (list = (char*)((s32)list + 7), (char*)((s32)list - 6 - _VA_FP_SAVE_AREA)) \
|
|
||||||
: (((s32)list & 0x2) /* 2 byte aligned? */ \
|
|
||||||
? (list = (char*)((s32)list + 10), (char*)((s32)list - 24 - _VA_FP_SAVE_AREA)) \
|
|
||||||
: __va_stack_arg(list, mode))))
|
|
||||||
|
|
||||||
#define va_arg(list, mode) ((mode*)(((__builtin_classof(mode) == _FP && \
|
#define __va_stack_arg(list, mode) \
|
||||||
__builtin_alignof(mode) == sizeof(f64)) \
|
( \
|
||||||
? __va_double_arg(list, mode) \
|
((list) = (char*)_VA_ALIGN(list, __builtin_alignof(mode)) + \
|
||||||
: __va_stack_arg(list, mode))))[-1]
|
_VA_ALIGN(sizeof(mode), 4)), \
|
||||||
|
(((char*)list) - (_VA_ALIGN(sizeof(mode), 4) - sizeof(mode))) \
|
||||||
|
)
|
||||||
|
|
||||||
|
#define __va_double_arg(list, mode) \
|
||||||
|
( \
|
||||||
|
(((long)list & 0x1) /* 1 byte aligned? */ \
|
||||||
|
? (list = (char*)((long)list + 7), (char*)((long)list - 6 - _VA_FP_SAVE_AREA)) \
|
||||||
|
: (((long)list & 0x2) /* 2 byte aligned? */ \
|
||||||
|
? (list = (char*)((long)list + 10), (char*)((long)list - 24 - _VA_FP_SAVE_AREA)) \
|
||||||
|
: __va_stack_arg(list, mode))) \
|
||||||
|
)
|
||||||
|
|
||||||
|
#define va_arg(list, mode) \
|
||||||
|
((mode*)(((__builtin_classof(mode) == _FP && \
|
||||||
|
__builtin_alignof(mode) == sizeof(double)) \
|
||||||
|
? __va_double_arg(list, mode) \
|
||||||
|
: __va_stack_arg(list, mode))))[-1]
|
||||||
|
|
||||||
|
/* No cleanup processing is required for the end of a varargs list: */
|
||||||
#define va_end(__list)
|
#define va_end(__list)
|
||||||
|
|
||||||
#endif
|
#endif /* __GNUC__ */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -5,7 +5,12 @@
|
||||||
|
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
|
|
||||||
#define bool u32
|
#if (__STDC_VERSION__ >= 199901L)
|
||||||
|
#define bool _Bool
|
||||||
|
#else
|
||||||
|
#define bool unsigned int
|
||||||
|
#endif
|
||||||
|
|
||||||
#define false 0
|
#define false 0
|
||||||
#define true 1
|
#define true 1
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,17 @@
|
||||||
|
|
||||||
#define NULL ((void*)0)
|
#define NULL ((void*)0)
|
||||||
|
|
||||||
typedef unsigned long size_t;
|
#if !defined(_SIZE_T) && !defined(_SIZE_T_)
|
||||||
|
#define _SIZE_T
|
||||||
|
|
||||||
|
#if !defined(_MIPS_SZLONG) || (_MIPS_SZLONG == 32)
|
||||||
|
typedef unsigned int size_t;
|
||||||
|
#endif
|
||||||
|
#if defined(_MIPS_SZLONG) && (_MIPS_SZLONG == 64)
|
||||||
|
typedef unsigned long size_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#define offsetof(structure, member) __builtin_offsetof (structure, member)
|
#define offsetof(structure, member) __builtin_offsetof (structure, member)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#ifndef STDINT_H
|
#ifndef STDINT_H
|
||||||
#define STDINT_H
|
#define STDINT_H
|
||||||
|
|
||||||
typedef signed int intptr_t;
|
typedef signed long intptr_t;
|
||||||
typedef unsigned int uintptr_t;
|
typedef unsigned long uintptr_t;
|
||||||
|
|
||||||
#define INT8_MIN (-0x80)
|
#define INT8_MIN (-0x80)
|
||||||
#define INT16_MIN (-0x8000)
|
#define INT16_MIN (-0x8000)
|
||||||
|
|
9
include/libc/stdio.h
Normal file
9
include/libc/stdio.h
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#ifndef STDIO_H
|
||||||
|
#define STDIO_H
|
||||||
|
|
||||||
|
#include "stdarg.h"
|
||||||
|
|
||||||
|
int sprintf(char* dst, const char* fmt, ...);
|
||||||
|
int vsprintf(char* dst, const char* fmt, va_list args);
|
||||||
|
|
||||||
|
#endif
|
|
@ -1,16 +1,17 @@
|
||||||
#ifndef STDLIB_H
|
#ifndef STDLIB_H
|
||||||
#define STDLIB_H
|
#define STDLIB_H
|
||||||
|
|
||||||
#include "ultra64.h"
|
|
||||||
|
|
||||||
typedef struct lldiv_t {
|
typedef struct lldiv_t {
|
||||||
s64 quot;
|
long long quot;
|
||||||
s64 rem;
|
long long rem;
|
||||||
} lldiv_t;
|
} lldiv_t;
|
||||||
|
|
||||||
typedef struct ldiv_t {
|
typedef struct ldiv_t {
|
||||||
s32 quot;
|
long quot;
|
||||||
s32 rem;
|
long rem;
|
||||||
} ldiv_t;
|
} ldiv_t;
|
||||||
|
|
||||||
|
ldiv_t ldiv(long num, long denom);
|
||||||
|
lldiv_t lldiv(long long num, long long denom);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
11
include/libc/string.h
Normal file
11
include/libc/string.h
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
#ifndef STRING_H
|
||||||
|
#define STRING_H
|
||||||
|
|
||||||
|
#include "stddef.h"
|
||||||
|
|
||||||
|
char* strchr(const char*, int);
|
||||||
|
size_t strlen(const char*);
|
||||||
|
|
||||||
|
void* memcpy(void*, const void*, size_t);
|
||||||
|
|
||||||
|
#endif
|
|
@ -171,14 +171,6 @@ extern struct GraphicsContext* __gfxCtx;
|
||||||
|
|
||||||
#define VTX_T(x,y,z,s,t,cr,cg,cb,a) { { x, y, z }, 0, { s, t }, { cr, cg, cb, a } }
|
#define VTX_T(x,y,z,s,t,cr,cg,cb,a) { { x, y, z }, 0, { s, t }, { cr, cg, cb, a } }
|
||||||
|
|
||||||
#ifdef NDEBUG
|
|
||||||
#define ASSERT(cond, msg, file, line) ((void)0)
|
|
||||||
#elif defined(REAL_ASSERT_MACRO)
|
|
||||||
#define ASSERT(cond, msg, file, line) ((cond) ? ((void)0) : __assert(#cond, __FILE__, __LINE__))
|
|
||||||
#else
|
|
||||||
#define ASSERT(cond, msg, file, line) ((cond) ? ((void)0) : __assert(msg, file, line))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define gDPSetTileCustom(pkt, fmt, siz, width, height, pal, cms, cmt, masks, maskt, shifts, shiftt) \
|
#define gDPSetTileCustom(pkt, fmt, siz, width, height, pal, cms, cmt, masks, maskt, shifts, shiftt) \
|
||||||
do { \
|
do { \
|
||||||
gDPPipeSync(pkt); \
|
gDPPipeSync(pkt); \
|
||||||
|
|
|
@ -7,7 +7,9 @@
|
||||||
* The strings are used in the message_data_static files themselves, as you can only concat strings with other strings
|
* The strings are used in the message_data_static files themselves, as you can only concat strings with other strings
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef GLUE
|
||||||
#define GLUE(a, b) a##b
|
#define GLUE(a, b) a##b
|
||||||
|
#endif
|
||||||
|
|
||||||
#define STRINGIFY(s) #s
|
#define STRINGIFY(s) #s
|
||||||
#define EXPAND_AND_STRINGIFY(s) STRINGIFY(s)
|
#define EXPAND_AND_STRINGIFY(s) STRINGIFY(s)
|
||||||
|
|
|
@ -8,28 +8,13 @@ struct GameState;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/* 0x00 */ char unk_00[0x18];
|
/* 0x00 */ char unk_00[0x18];
|
||||||
/* 0x18 */ s32 unk_18;
|
/* 0x18 */ s32 x; // Unused
|
||||||
/* 0x1C */ s32 y;
|
/* 0x1C */ s32 y;
|
||||||
} SpeedMeter; // size = 0x20
|
} SpeedMeter; // size = 0x20
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
/* 0x00 */ s32 maxval;
|
|
||||||
/* 0x04 */ s32 val;
|
|
||||||
/* 0x08 */ u16 backColor;
|
|
||||||
/* 0x0A */ u16 foreColor;
|
|
||||||
/* 0x0C */ s32 ulx;
|
|
||||||
/* 0x10 */ s32 lrx;
|
|
||||||
/* 0x14 */ s32 uly;
|
|
||||||
/* 0x18 */ s32 lry;
|
|
||||||
} SpeedMeterAllocEntry; // size = 0x1C
|
|
||||||
|
|
||||||
void SpeedMeter_InitImpl(SpeedMeter* this, u32 arg1, u32 y);
|
|
||||||
void SpeedMeter_Init(SpeedMeter* this);
|
void SpeedMeter_Init(SpeedMeter* this);
|
||||||
void SpeedMeter_Destroy(SpeedMeter* this);
|
void SpeedMeter_Destroy(SpeedMeter* this);
|
||||||
void SpeedMeter_DrawTimeEntries(SpeedMeter* this, struct GraphicsContext* gfxCtx);
|
void SpeedMeter_DrawTimeEntries(SpeedMeter* this, struct GraphicsContext* gfxCtx);
|
||||||
void SpeedMeter_InitAllocEntry(SpeedMeterAllocEntry* this, u32 maxval, u32 val, u16 backColor, u16 foreColor, u32 ulx,
|
|
||||||
u32 lrx, u32 uly, u32 lry);
|
|
||||||
void SpeedMeter_DrawAllocEntry(SpeedMeterAllocEntry* this, struct GraphicsContext* gfxCtx);
|
|
||||||
void SpeedMeter_DrawAllocEntries(SpeedMeter* meter, struct GraphicsContext* gfxCtx, struct GameState* state);
|
void SpeedMeter_DrawAllocEntries(SpeedMeter* meter, struct GraphicsContext* gfxCtx, struct GameState* state);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,16 +1,21 @@
|
||||||
#ifndef ULTRA64_H
|
#ifndef ULTRA64_H
|
||||||
#define ULTRA64_H
|
#define ULTRA64_H
|
||||||
|
|
||||||
#include "ultra64/ultratypes.h"
|
#include "libc/assert.h"
|
||||||
#include "unk.h"
|
#include "libc/math.h"
|
||||||
|
|
||||||
#include "libc/stdarg.h"
|
#include "libc/stdarg.h"
|
||||||
#include "libc/stdbool.h"
|
#include "libc/stdbool.h"
|
||||||
#include "libc/stddef.h"
|
#include "libc/stddef.h"
|
||||||
#include "libc/stdint.h"
|
#include "libc/stdint.h"
|
||||||
|
#include "libc/stdio.h"
|
||||||
#include "libc/stdlib.h"
|
#include "libc/stdlib.h"
|
||||||
#include "libc/math.h"
|
#include "libc/string.h"
|
||||||
|
|
||||||
|
#include "ultra64/ultratypes.h"
|
||||||
|
#include "unk.h"
|
||||||
|
|
||||||
|
#include "ultra64/libc.h"
|
||||||
|
#include "ultra64/xstdio.h"
|
||||||
#include "ultra64/exception.h"
|
#include "ultra64/exception.h"
|
||||||
#include "ultra64/rcp.h"
|
#include "ultra64/rcp.h"
|
||||||
#include "ultra64/thread.h"
|
#include "ultra64/thread.h"
|
||||||
|
@ -22,7 +27,6 @@
|
||||||
#include "ultra64/vi.h"
|
#include "ultra64/vi.h"
|
||||||
#include "ultra64/pi.h"
|
#include "ultra64/pi.h"
|
||||||
#include "ultra64/controller.h"
|
#include "ultra64/controller.h"
|
||||||
#include "ultra64/printf.h"
|
|
||||||
#include "ultra64/mbi.h"
|
#include "ultra64/mbi.h"
|
||||||
#include "ultra64/pfs.h"
|
#include "ultra64/pfs.h"
|
||||||
#include "ultra64/motor.h"
|
#include "ultra64/motor.h"
|
||||||
|
|
|
@ -1,8 +1,26 @@
|
||||||
#ifndef ULTRA64_GU_H
|
#ifndef ULTRA64_GU_H
|
||||||
#define ULTRA64_GU_H
|
#define ULTRA64_GU_H
|
||||||
|
|
||||||
|
#include "ultratypes.h"
|
||||||
|
|
||||||
#define GU_PI 3.1415926
|
#define GU_PI 3.1415926
|
||||||
|
|
||||||
#define ROUND(x) (s32)(((x) >= 0.0) ? ((x) + 0.5) : ((x) - 0.5))
|
#define ROUND(x) (s32)(((x) >= 0.0) ? ((x) + 0.5) : ((x) - 0.5))
|
||||||
|
|
||||||
|
typedef union {
|
||||||
|
struct {
|
||||||
|
u32 hi;
|
||||||
|
u32 lo;
|
||||||
|
} word;
|
||||||
|
|
||||||
|
f64 d;
|
||||||
|
} du;
|
||||||
|
|
||||||
|
typedef union {
|
||||||
|
u32 i;
|
||||||
|
f32 f;
|
||||||
|
} fu;
|
||||||
|
|
||||||
|
extern f32 __libm_qnan_f;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
12
include/ultra64/libc.h
Normal file
12
include/ultra64/libc.h
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
#ifndef ULTRA64_LIBC_H
|
||||||
|
#define ULTRA64_LIBC_H
|
||||||
|
|
||||||
|
#include "stddef.h"
|
||||||
|
|
||||||
|
void osSyncPrintf(const char* fmt, ...);
|
||||||
|
|
||||||
|
void bzero(void* __s, size_t __n);
|
||||||
|
int bcmp(const void* __sl, const void* __s2, size_t __n);
|
||||||
|
void bcopy(const void* __src, void* __dest, size_t __n);
|
||||||
|
|
||||||
|
#endif
|
|
@ -1,33 +0,0 @@
|
||||||
#ifndef ULTRA64_PRINTF_H
|
|
||||||
#define ULTRA64_PRINTF_H
|
|
||||||
|
|
||||||
#include "ultratypes.h"
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
/* 0x0 */ union {
|
|
||||||
/* 0x0 */ s64 ll;
|
|
||||||
/* 0x0 */ f64 ld;
|
|
||||||
} v;
|
|
||||||
/* 0x8 */ char* s;
|
|
||||||
/* 0xC */ s32 n0;
|
|
||||||
/* 0x10 */ s32 nz0;
|
|
||||||
/* 0x14 */ s32 n1;
|
|
||||||
/* 0x18 */ s32 nz1;
|
|
||||||
/* 0x1C */ s32 n2;
|
|
||||||
/* 0x20 */ s32 nz2;
|
|
||||||
/* 0x24 */ s32 prec;
|
|
||||||
/* 0x28 */ s32 width;
|
|
||||||
/* 0x2C */ u32 nchar;
|
|
||||||
/* 0x30 */ u32 flags;
|
|
||||||
/* 0x34 */ u8 qual;
|
|
||||||
} _Pft; // size = 0x38
|
|
||||||
|
|
||||||
typedef void* (*PrintCallback)(void*, const char*, u32);
|
|
||||||
|
|
||||||
#define FLAGS_SPACE 1
|
|
||||||
#define FLAGS_PLUS 2
|
|
||||||
#define FLAGS_MINUS 4
|
|
||||||
#define FLAGS_HASH 8
|
|
||||||
#define FLAGS_ZERO 16
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -7,8 +7,8 @@ typedef signed char s8;
|
||||||
typedef unsigned char u8;
|
typedef unsigned char u8;
|
||||||
typedef signed short int s16;
|
typedef signed short int s16;
|
||||||
typedef unsigned short int u16;
|
typedef unsigned short int u16;
|
||||||
typedef signed int s32;
|
typedef signed long s32;
|
||||||
typedef unsigned int u32;
|
typedef unsigned long u32;
|
||||||
typedef signed long long int s64;
|
typedef signed long long int s64;
|
||||||
typedef unsigned long long int u64;
|
typedef unsigned long long int u64;
|
||||||
|
|
||||||
|
|
44
include/ultra64/xstdio.h
Normal file
44
include/ultra64/xstdio.h
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
#ifndef ULTRA64_PRINTF_H
|
||||||
|
#define ULTRA64_PRINTF_H
|
||||||
|
|
||||||
|
#include "stdarg.h"
|
||||||
|
|
||||||
|
// IDO doesn't support long double types, improve portability for compilers supporting them
|
||||||
|
#ifdef __sgi
|
||||||
|
#define LONG_DOUBLE_TYPE double
|
||||||
|
#else
|
||||||
|
#define LONG_DOUBLE_TYPE long double
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
/* 0x00 */ union {
|
||||||
|
long long ll;
|
||||||
|
LONG_DOUBLE_TYPE ld;
|
||||||
|
} v;
|
||||||
|
/* 0x08 */ char* s;
|
||||||
|
/* 0x0C */ int n0;
|
||||||
|
/* 0x10 */ int nz0;
|
||||||
|
/* 0x14 */ int n1;
|
||||||
|
/* 0x18 */ int nz1;
|
||||||
|
/* 0x1C */ int n2;
|
||||||
|
/* 0x20 */ int nz2;
|
||||||
|
/* 0x24 */ int prec;
|
||||||
|
/* 0x28 */ int width;
|
||||||
|
/* 0x2C */ size_t nchar;
|
||||||
|
/* 0x30 */ unsigned int flags;
|
||||||
|
/* 0x34 */ char qual;
|
||||||
|
} _Pft; // size = 0x38
|
||||||
|
|
||||||
|
typedef void* (*PrintCallback)(void*, const char*, size_t);
|
||||||
|
|
||||||
|
int _Printf(PrintCallback, void* arg, const char* fmt, va_list ap);
|
||||||
|
void _Litob(_Pft* args, char code);
|
||||||
|
void _Ldtob(_Pft* args, char code);
|
||||||
|
|
||||||
|
#define FLAGS_SPACE (1 << 0)
|
||||||
|
#define FLAGS_PLUS (1 << 1)
|
||||||
|
#define FLAGS_MINUS (1 << 2)
|
||||||
|
#define FLAGS_HASH (1 << 3)
|
||||||
|
#define FLAGS_ZERO (1 << 4)
|
||||||
|
|
||||||
|
#endif
|
|
@ -56,7 +56,7 @@ extern Gfx D_80116280[];
|
||||||
extern ActorOverlay gActorOverlayTable[ACTOR_ID_MAX]; // original name: "actor_dlftbls" 801162A0
|
extern ActorOverlay gActorOverlayTable[ACTOR_ID_MAX]; // original name: "actor_dlftbls" 801162A0
|
||||||
extern s32 gMaxActorId; // original name: "MaxProfile"
|
extern s32 gMaxActorId; // original name: "MaxProfile"
|
||||||
extern s32 gDebugCamEnabled;
|
extern s32 gDebugCamEnabled;
|
||||||
extern GameStateOverlay gGameStateOverlayTable[6];
|
extern GameStateOverlay gGameStateOverlayTable[GAMESTATE_ID_MAX];
|
||||||
extern u8 gWeatherMode;
|
extern u8 gWeatherMode;
|
||||||
extern u8 gLightConfigAfterUnderwater;
|
extern u8 gLightConfigAfterUnderwater;
|
||||||
extern u8 gInterruptSongOfStorms;
|
extern u8 gInterruptSongOfStorms;
|
||||||
|
|
|
@ -399,10 +399,10 @@ typedef struct PlayState {
|
||||||
/* 0x11D34 */ TransitionActorContext transiActorCtx;
|
/* 0x11D34 */ TransitionActorContext transiActorCtx;
|
||||||
/* 0x11D3C */ void (*playerInit)(Player* player, struct PlayState* play, FlexSkeletonHeader* skelHeader);
|
/* 0x11D3C */ void (*playerInit)(Player* player, struct PlayState* play, FlexSkeletonHeader* skelHeader);
|
||||||
/* 0x11D40 */ void (*playerUpdate)(Player* player, struct PlayState* play, Input* input);
|
/* 0x11D40 */ void (*playerUpdate)(Player* player, struct PlayState* play, Input* input);
|
||||||
/* 0x11D44 */ s32 (*isPlayerDroppingFish)(struct PlayState* play);
|
/* 0x11D44 */ int (*isPlayerDroppingFish)(struct PlayState* play);
|
||||||
/* 0x11D48 */ s32 (*startPlayerFishing)(struct PlayState* play);
|
/* 0x11D48 */ s32 (*startPlayerFishing)(struct PlayState* play);
|
||||||
/* 0x11D4C */ s32 (*grabPlayer)(struct PlayState* play, Player* player);
|
/* 0x11D4C */ s32 (*grabPlayer)(struct PlayState* play, Player* player);
|
||||||
/* 0x11D50 */ s32 (*startPlayerCutscene)(struct PlayState* play, Actor* actor, s32 csMode);
|
/* 0x11D50 */ s32 (*tryPlayerCsAction)(struct PlayState* play, Actor* actor, s32 csAction);
|
||||||
/* 0x11D54 */ void (*func_11D54)(Player* player, struct PlayState* play);
|
/* 0x11D54 */ void (*func_11D54)(Player* player, struct PlayState* play);
|
||||||
/* 0x11D58 */ s32 (*damagePlayer)(struct PlayState* play, s32 damage);
|
/* 0x11D58 */ s32 (*damagePlayer)(struct PlayState* play, s32 damage);
|
||||||
/* 0x11D5C */ void (*talkWithPlayer)(struct PlayState* play, Actor* actor);
|
/* 0x11D5C */ void (*talkWithPlayer)(struct PlayState* play, Actor* actor);
|
||||||
|
|
|
@ -21,10 +21,6 @@ typedef struct {
|
||||||
/* 0x0A */ s16 z;
|
/* 0x0A */ s16 z;
|
||||||
} LegacyJointKey; // size = 0x0C
|
} LegacyJointKey; // size = 0x0C
|
||||||
|
|
||||||
// ZAPD compatibility typedefs
|
|
||||||
// TODO: Remove when ZAPD adds support for them
|
|
||||||
typedef LegacyJointKey JointKey;
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/* 0x00 */ s16 frameCount;
|
/* 0x00 */ s16 frameCount;
|
||||||
/* 0x02 */ s16 limbCount;
|
/* 0x02 */ s16 limbCount;
|
||||||
|
|
|
@ -72,10 +72,6 @@ typedef struct {
|
||||||
/* 0x4 */ Vec3s* bgCamFuncData; // s16 data grouped in threes (ex. Vec3s), is usually of type `BgCamFuncData`, but can be a list of points of type `Vec3s` for crawlspaces
|
/* 0x4 */ Vec3s* bgCamFuncData; // s16 data grouped in threes (ex. Vec3s), is usually of type `BgCamFuncData`, but can be a list of points of type `Vec3s` for crawlspaces
|
||||||
} BgCamInfo; // size = 0x8
|
} BgCamInfo; // size = 0x8
|
||||||
|
|
||||||
// ZAPD compatibility typedefs
|
|
||||||
// TODO: Remove when ZAPD adds support for them
|
|
||||||
typedef BgCamInfo CamData;
|
|
||||||
|
|
||||||
// The structure used for all instances of s16 data from `BgCamInfo` with the exception of crawlspaces.
|
// The structure used for all instances of s16 data from `BgCamInfo` with the exception of crawlspaces.
|
||||||
// See `Camera_Subj4` for Vec3s data usage in crawlspaces
|
// See `Camera_Subj4` for Vec3s data usage in crawlspaces
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -1254,7 +1254,7 @@ typedef enum {
|
||||||
#define ONEPOINT_CS_INIT_FIELD_NONE 0xFF
|
#define ONEPOINT_CS_INIT_FIELD_NONE 0xFF
|
||||||
#define ONEPOINT_CS_INIT_FIELD_ACTORCAT(actorCat) (0x80 | ((actorCat) & 0x0F))
|
#define ONEPOINT_CS_INIT_FIELD_ACTORCAT(actorCat) (0x80 | ((actorCat) & 0x0F))
|
||||||
#define ONEPOINT_CS_INIT_FIELD_HUD_VISIBILITY(camHudVisibility) (0xC0 | ((camHudVisibility) & 0x0F))
|
#define ONEPOINT_CS_INIT_FIELD_HUD_VISIBILITY(camHudVisibility) (0xC0 | ((camHudVisibility) & 0x0F))
|
||||||
#define ONEPOINT_CS_INIT_FIELD_PLAYER_CS(csMode) ((csMode) & 0x7F)
|
#define ONEPOINT_CS_INIT_FIELD_PLAYER_CS(csAction) ((csAction) & 0x7F)
|
||||||
|
|
||||||
#define ONEPOINT_CS_INIT_FIELD_IS_TYPE_ACTORCAT(field) ((field & 0xF0) == 0x80)
|
#define ONEPOINT_CS_INIT_FIELD_IS_TYPE_ACTORCAT(field) ((field & 0xF0) == 0x80)
|
||||||
#define ONEPOINT_CS_INIT_FIELD_IS_TYPE_HUD_VISIBILITY(field) ((field & 0xF0) == 0xC0)
|
#define ONEPOINT_CS_INIT_FIELD_IS_TYPE_HUD_VISIBILITY(field) ((field & 0xF0) == 0xC0)
|
||||||
|
|
|
@ -59,10 +59,4 @@ s32 SkelCurve_Update(struct PlayState* play, SkelCurve* skelCurve);
|
||||||
void SkelCurve_Draw(Actor* actor, struct PlayState* play, SkelCurve* skelCurve, OverrideCurveLimbDraw overrideLimbDraw,
|
void SkelCurve_Draw(Actor* actor, struct PlayState* play, SkelCurve* skelCurve, OverrideCurveLimbDraw overrideLimbDraw,
|
||||||
PostCurveLimbDraw postLimbDraw, s32 lod, void* data);
|
PostCurveLimbDraw postLimbDraw, s32 lod, void* data);
|
||||||
|
|
||||||
// ZAPD compatibility typedefs
|
|
||||||
// TODO: Remove when ZAPD adds support for them
|
|
||||||
typedef CurveInterpKnot TransformData;
|
|
||||||
typedef CurveAnimationHeader TransformUpdateIndex;
|
|
||||||
typedef CurveSkeletonHeader SkelCurveLimbList;
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -494,10 +494,6 @@ typedef union {
|
||||||
#define CS_CAM_CONTINUE 0
|
#define CS_CAM_CONTINUE 0
|
||||||
#define CS_CAM_STOP -1
|
#define CS_CAM_STOP -1
|
||||||
|
|
||||||
// todo: remove after ZAPD is updated
|
|
||||||
#define CS_CMD_CONTINUE CS_CAM_CONTINUE
|
|
||||||
#define CS_CMD_STOP CS_CAM_STOP
|
|
||||||
|
|
||||||
#define CS_CAM_DATA_NOT_APPLIED 0xFFFF
|
#define CS_CAM_DATA_NOT_APPLIED 0xFFFF
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -271,50 +271,4 @@
|
||||||
CMD_W(unk1), CMD_W(unk2), CMD_W(unk3), CMD_W(unk4), CMD_W(unk5), CMD_W(unk6), \
|
CMD_W(unk1), CMD_W(unk2), CMD_W(unk3), CMD_W(unk4), CMD_W(unk5), CMD_W(unk6), \
|
||||||
CMD_W(unk7), CMD_W(unk8), CMD_W(unk9), CMD_W(unk10), CMD_W(unk11), CMD_W(unk12)
|
CMD_W(unk7), CMD_W(unk8), CMD_W(unk9), CMD_W(unk10), CMD_W(unk11), CMD_W(unk12)
|
||||||
|
|
||||||
// TODO: Fix ZAPD and delete these (everything to the end of the file)
|
|
||||||
#define CS_CAM_POS_LIST CS_CAM_EYE_SPLINE
|
|
||||||
#define CS_CAM_POS CS_CAM_POINT
|
|
||||||
#define CS_CAM_FOCUS_POINT_LIST CS_CAM_AT_SPLINE
|
|
||||||
#define CS_CAM_FOCUS_POINT CS_CAM_POINT
|
|
||||||
#define CS_CAM_POS_PLAYER_LIST CS_CAM_EYE_SPLINE_REL_TO_PLAYER
|
|
||||||
#define CS_CAM_POS_PLAYER CS_CAM_POINT
|
|
||||||
#define CS_CAM_FOCUS_POINT_PLAYER_LIST CS_CAM_AT_SPLINE_REL_TO_PLAYER
|
|
||||||
#define CS_CAM_FOCUS_POINT_PLAYER CS_CAM_POINT
|
|
||||||
#define CS_NPC_ACTION_LIST CS_ACTOR_CUE_LIST
|
|
||||||
#define CS_NPC_ACTION CS_ACTOR_CUE
|
|
||||||
#define CS_PLAYER_ACTION_LIST CS_PLAYER_CUE_LIST
|
|
||||||
#define CS_PLAYER_ACTION CS_PLAYER_CUE
|
|
||||||
#define CS_LIGHTING_LIST CS_LIGHT_SETTING_LIST
|
|
||||||
#define CS_CMD_09_LIST CS_RUMBLE_CONTROLLER_LIST
|
|
||||||
#define CS_CMD_09 CS_RUMBLE_CONTROLLER
|
|
||||||
#define CS_TEXT_DISPLAY_TEXTBOX CS_TEXT
|
|
||||||
#define CS_TEXT_LEARN_SONG CS_TEXT_OCARINA_ACTION
|
|
||||||
#define CS_SCENE_TRANS_FX CS_TRANSITION
|
|
||||||
#define CS_PLAY_BGM_LIST CS_START_SEQ_LIST
|
|
||||||
#define CS_STOP_BGM_LIST CS_STOP_SEQ_LIST
|
|
||||||
#define CS_FADE_BGM_LIST CS_FADE_OUT_SEQ_LIST
|
|
||||||
#define CS_FADE_BGM CS_FADE_OUT_SEQ
|
|
||||||
#define CS_TERMINATOR CS_DESTINATION
|
|
||||||
|
|
||||||
// CS_TIME macro:
|
|
||||||
// The last argument of the macro was removed, but ZAPD isn't aware
|
|
||||||
// Passing 6 arguments to a 5-arguments macro works fine with IDO, so ignore this hack for IDO
|
|
||||||
#ifndef __sgi
|
|
||||||
// Only spot06_scene uses CS_TIME. Limit the hack to that file, so everything else can use the new macro
|
|
||||||
# ifdef SPOT06_SCENE_H
|
|
||||||
# undef CS_TIME
|
|
||||||
# define CS_TIME(unused0, startFrame, endFrame, hour, min, _unusedZapdCompatibilityArg) \
|
|
||||||
CMD_HH(unused0, startFrame), CMD_HBB(endFrame, hour, min), CMD_W(0)
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define CS_PLAY_BGM(seqId, startFrame, endFrame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7) \
|
|
||||||
CS_START_SEQ((seqId)-1, startFrame, endFrame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7)
|
|
||||||
|
|
||||||
#define CS_STOP_BGM(seqId, frame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7, unused8) \
|
|
||||||
CS_STOP_SEQ((seqId)-1, frame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7, unused8)
|
|
||||||
|
|
||||||
#define CS_LIGHTING(lightSetting, frame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7, unused8) \
|
|
||||||
CS_LIGHT_SETTING((lightSetting)-1, frame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7, unused8)
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -166,10 +166,6 @@ typedef struct {
|
||||||
/* 0x14 */ s16 zFar;
|
/* 0x14 */ s16 zFar;
|
||||||
} EnvLightSettings; // size = 0x16
|
} EnvLightSettings; // size = 0x16
|
||||||
|
|
||||||
// ZAPD compatibility typedefs
|
|
||||||
// TODO: Remove when ZAPD adds support for them
|
|
||||||
typedef EnvLightSettings LightSettings;
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/* 0x00 */ char unk_00[0x02];
|
/* 0x00 */ char unk_00[0x02];
|
||||||
/* 0x02 */ u16 sceneTimeSpeed; // time speed value from the scene file
|
/* 0x02 */ u16 sceneTimeSpeed; // time speed value from the scene file
|
||||||
|
|
|
@ -353,111 +353,193 @@ typedef enum {
|
||||||
#define PLAYER_LIMB_BUF_COUNT LIMB_BUF_COUNT(PLAYER_LIMB_MAX)
|
#define PLAYER_LIMB_BUF_COUNT LIMB_BUF_COUNT(PLAYER_LIMB_MAX)
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
/* 0x00 */ PLAYER_CSMODE_NONE,
|
/* 0x00 */ PLAYER_CSACTION_NONE,
|
||||||
/* 0x01 */ PLAYER_CSMODE_1,
|
/* 0x01 */ PLAYER_CSACTION_1,
|
||||||
/* 0x02 */ PLAYER_CSMODE_2,
|
/* 0x02 */ PLAYER_CSACTION_2,
|
||||||
/* 0x03 */ PLAYER_CSMODE_3,
|
/* 0x03 */ PLAYER_CSACTION_3,
|
||||||
/* 0x04 */ PLAYER_CSMODE_4,
|
/* 0x04 */ PLAYER_CSACTION_4,
|
||||||
/* 0x05 */ PLAYER_CSMODE_5,
|
/* 0x05 */ PLAYER_CSACTION_5,
|
||||||
/* 0x06 */ PLAYER_CSMODE_6,
|
/* 0x06 */ PLAYER_CSACTION_6,
|
||||||
/* 0x07 */ PLAYER_CSMODE_7,
|
/* 0x07 */ PLAYER_CSACTION_7,
|
||||||
/* 0x08 */ PLAYER_CSMODE_8,
|
/* 0x08 */ PLAYER_CSACTION_8,
|
||||||
/* 0x09 */ PLAYER_CSMODE_9,
|
/* 0x09 */ PLAYER_CSACTION_9,
|
||||||
/* 0x0A */ PLAYER_CSMODE_10,
|
/* 0x0A */ PLAYER_CSACTION_10,
|
||||||
/* 0x0B */ PLAYER_CSMODE_11,
|
/* 0x0B */ PLAYER_CSACTION_11,
|
||||||
/* 0x0C */ PLAYER_CSMODE_12,
|
/* 0x0C */ PLAYER_CSACTION_12,
|
||||||
/* 0x0D */ PLAYER_CSMODE_13,
|
/* 0x0D */ PLAYER_CSACTION_13,
|
||||||
/* 0x0E */ PLAYER_CSMODE_14,
|
/* 0x0E */ PLAYER_CSACTION_14,
|
||||||
/* 0x0F */ PLAYER_CSMODE_15,
|
/* 0x0F */ PLAYER_CSACTION_15,
|
||||||
/* 0x10 */ PLAYER_CSMODE_16,
|
/* 0x10 */ PLAYER_CSACTION_16,
|
||||||
/* 0x11 */ PLAYER_CSMODE_17,
|
/* 0x11 */ PLAYER_CSACTION_17,
|
||||||
/* 0x12 */ PLAYER_CSMODE_18,
|
/* 0x12 */ PLAYER_CSACTION_18,
|
||||||
/* 0x13 */ PLAYER_CSMODE_19,
|
/* 0x13 */ PLAYER_CSACTION_19,
|
||||||
/* 0x14 */ PLAYER_CSMODE_20,
|
/* 0x14 */ PLAYER_CSACTION_20,
|
||||||
/* 0x15 */ PLAYER_CSMODE_21,
|
/* 0x15 */ PLAYER_CSACTION_21,
|
||||||
/* 0x16 */ PLAYER_CSMODE_22,
|
/* 0x16 */ PLAYER_CSACTION_22,
|
||||||
/* 0x17 */ PLAYER_CSMODE_23,
|
/* 0x17 */ PLAYER_CSACTION_23,
|
||||||
/* 0x18 */ PLAYER_CSMODE_24,
|
/* 0x18 */ PLAYER_CSACTION_24,
|
||||||
/* 0x19 */ PLAYER_CSMODE_25,
|
/* 0x19 */ PLAYER_CSACTION_25,
|
||||||
/* 0x1A */ PLAYER_CSMODE_26,
|
/* 0x1A */ PLAYER_CSACTION_26,
|
||||||
/* 0x1B */ PLAYER_CSMODE_27,
|
/* 0x1B */ PLAYER_CSACTION_27,
|
||||||
/* 0x1C */ PLAYER_CSMODE_28,
|
/* 0x1C */ PLAYER_CSACTION_28,
|
||||||
/* 0x1D */ PLAYER_CSMODE_29,
|
/* 0x1D */ PLAYER_CSACTION_29,
|
||||||
/* 0x1E */ PLAYER_CSMODE_30,
|
/* 0x1E */ PLAYER_CSACTION_30,
|
||||||
/* 0x1F */ PLAYER_CSMODE_31,
|
/* 0x1F */ PLAYER_CSACTION_31,
|
||||||
/* 0x20 */ PLAYER_CSMODE_32,
|
/* 0x20 */ PLAYER_CSACTION_32,
|
||||||
/* 0x21 */ PLAYER_CSMODE_33,
|
/* 0x21 */ PLAYER_CSACTION_33,
|
||||||
/* 0x22 */ PLAYER_CSMODE_34,
|
/* 0x22 */ PLAYER_CSACTION_34,
|
||||||
/* 0x23 */ PLAYER_CSMODE_35,
|
/* 0x23 */ PLAYER_CSACTION_35,
|
||||||
/* 0x24 */ PLAYER_CSMODE_36,
|
/* 0x24 */ PLAYER_CSACTION_36,
|
||||||
/* 0x25 */ PLAYER_CSMODE_37,
|
/* 0x25 */ PLAYER_CSACTION_37,
|
||||||
/* 0x26 */ PLAYER_CSMODE_38,
|
/* 0x26 */ PLAYER_CSACTION_38,
|
||||||
/* 0x27 */ PLAYER_CSMODE_39,
|
/* 0x27 */ PLAYER_CSACTION_39,
|
||||||
/* 0x28 */ PLAYER_CSMODE_40,
|
/* 0x28 */ PLAYER_CSACTION_40,
|
||||||
/* 0x29 */ PLAYER_CSMODE_41,
|
/* 0x29 */ PLAYER_CSACTION_41,
|
||||||
/* 0x2A */ PLAYER_CSMODE_42,
|
/* 0x2A */ PLAYER_CSACTION_42,
|
||||||
/* 0x2B */ PLAYER_CSMODE_43,
|
/* 0x2B */ PLAYER_CSACTION_43,
|
||||||
/* 0x2C */ PLAYER_CSMODE_44,
|
/* 0x2C */ PLAYER_CSACTION_44,
|
||||||
/* 0x2D */ PLAYER_CSMODE_45,
|
/* 0x2D */ PLAYER_CSACTION_45,
|
||||||
/* 0x2E */ PLAYER_CSMODE_46,
|
/* 0x2E */ PLAYER_CSACTION_46,
|
||||||
/* 0x2F */ PLAYER_CSMODE_47,
|
/* 0x2F */ PLAYER_CSACTION_47,
|
||||||
/* 0x30 */ PLAYER_CSMODE_48,
|
/* 0x30 */ PLAYER_CSACTION_48,
|
||||||
/* 0x31 */ PLAYER_CSMODE_49,
|
/* 0x31 */ PLAYER_CSACTION_49,
|
||||||
/* 0x32 */ PLAYER_CSMODE_50,
|
/* 0x32 */ PLAYER_CSACTION_50,
|
||||||
/* 0x33 */ PLAYER_CSMODE_51,
|
/* 0x33 */ PLAYER_CSACTION_51,
|
||||||
/* 0x34 */ PLAYER_CSMODE_52,
|
/* 0x34 */ PLAYER_CSACTION_52,
|
||||||
/* 0x35 */ PLAYER_CSMODE_53,
|
/* 0x35 */ PLAYER_CSACTION_53,
|
||||||
/* 0x36 */ PLAYER_CSMODE_54,
|
/* 0x36 */ PLAYER_CSACTION_54,
|
||||||
/* 0x37 */ PLAYER_CSMODE_55,
|
/* 0x37 */ PLAYER_CSACTION_55,
|
||||||
/* 0x38 */ PLAYER_CSMODE_56,
|
/* 0x38 */ PLAYER_CSACTION_56,
|
||||||
/* 0x39 */ PLAYER_CSMODE_57,
|
/* 0x39 */ PLAYER_CSACTION_57,
|
||||||
/* 0x3A */ PLAYER_CSMODE_58,
|
/* 0x3A */ PLAYER_CSACTION_58,
|
||||||
/* 0x3B */ PLAYER_CSMODE_59,
|
/* 0x3B */ PLAYER_CSACTION_59,
|
||||||
/* 0x3C */ PLAYER_CSMODE_60,
|
/* 0x3C */ PLAYER_CSACTION_60,
|
||||||
/* 0x3D */ PLAYER_CSMODE_61,
|
/* 0x3D */ PLAYER_CSACTION_61,
|
||||||
/* 0x3E */ PLAYER_CSMODE_62,
|
/* 0x3E */ PLAYER_CSACTION_62,
|
||||||
/* 0x3F */ PLAYER_CSMODE_63,
|
/* 0x3F */ PLAYER_CSACTION_63,
|
||||||
/* 0x40 */ PLAYER_CSMODE_64,
|
/* 0x40 */ PLAYER_CSACTION_64,
|
||||||
/* 0x41 */ PLAYER_CSMODE_65,
|
/* 0x41 */ PLAYER_CSACTION_65,
|
||||||
/* 0x42 */ PLAYER_CSMODE_66,
|
/* 0x42 */ PLAYER_CSACTION_66,
|
||||||
/* 0x43 */ PLAYER_CSMODE_67,
|
/* 0x43 */ PLAYER_CSACTION_67,
|
||||||
/* 0x44 */ PLAYER_CSMODE_68,
|
/* 0x44 */ PLAYER_CSACTION_68,
|
||||||
/* 0x45 */ PLAYER_CSMODE_69,
|
/* 0x45 */ PLAYER_CSACTION_69,
|
||||||
/* 0x46 */ PLAYER_CSMODE_70,
|
/* 0x46 */ PLAYER_CSACTION_70,
|
||||||
/* 0x47 */ PLAYER_CSMODE_71,
|
/* 0x47 */ PLAYER_CSACTION_71,
|
||||||
/* 0x48 */ PLAYER_CSMODE_72,
|
/* 0x48 */ PLAYER_CSACTION_72,
|
||||||
/* 0x49 */ PLAYER_CSMODE_73,
|
/* 0x49 */ PLAYER_CSACTION_73,
|
||||||
/* 0x4A */ PLAYER_CSMODE_74,
|
/* 0x4A */ PLAYER_CSACTION_74,
|
||||||
/* 0x4B */ PLAYER_CSMODE_75,
|
/* 0x4B */ PLAYER_CSACTION_75,
|
||||||
/* 0x4C */ PLAYER_CSMODE_76,
|
/* 0x4C */ PLAYER_CSACTION_76,
|
||||||
/* 0x4D */ PLAYER_CSMODE_77,
|
/* 0x4D */ PLAYER_CSACTION_77,
|
||||||
/* 0x4E */ PLAYER_CSMODE_78,
|
/* 0x4E */ PLAYER_CSACTION_78,
|
||||||
/* 0x4F */ PLAYER_CSMODE_79,
|
/* 0x4F */ PLAYER_CSACTION_79,
|
||||||
/* 0x50 */ PLAYER_CSMODE_80,
|
/* 0x50 */ PLAYER_CSACTION_80,
|
||||||
/* 0x51 */ PLAYER_CSMODE_81,
|
/* 0x51 */ PLAYER_CSACTION_81,
|
||||||
/* 0x52 */ PLAYER_CSMODE_82,
|
/* 0x52 */ PLAYER_CSACTION_82,
|
||||||
/* 0x53 */ PLAYER_CSMODE_83,
|
/* 0x53 */ PLAYER_CSACTION_83,
|
||||||
/* 0x54 */ PLAYER_CSMODE_84,
|
/* 0x54 */ PLAYER_CSACTION_84,
|
||||||
/* 0x55 */ PLAYER_CSMODE_85,
|
/* 0x55 */ PLAYER_CSACTION_85,
|
||||||
/* 0x56 */ PLAYER_CSMODE_86,
|
/* 0x56 */ PLAYER_CSACTION_86,
|
||||||
/* 0x57 */ PLAYER_CSMODE_87,
|
/* 0x57 */ PLAYER_CSACTION_87,
|
||||||
/* 0x58 */ PLAYER_CSMODE_88,
|
/* 0x58 */ PLAYER_CSACTION_88,
|
||||||
/* 0x59 */ PLAYER_CSMODE_89,
|
/* 0x59 */ PLAYER_CSACTION_89,
|
||||||
/* 0x5A */ PLAYER_CSMODE_90,
|
/* 0x5A */ PLAYER_CSACTION_90,
|
||||||
/* 0x5B */ PLAYER_CSMODE_91,
|
/* 0x5B */ PLAYER_CSACTION_91,
|
||||||
/* 0x5C */ PLAYER_CSMODE_92,
|
/* 0x5C */ PLAYER_CSACTION_92,
|
||||||
/* 0x5D */ PLAYER_CSMODE_93,
|
/* 0x5D */ PLAYER_CSACTION_93,
|
||||||
/* 0x5E */ PLAYER_CSMODE_94,
|
/* 0x5E */ PLAYER_CSACTION_94,
|
||||||
/* 0x5F */ PLAYER_CSMODE_95,
|
/* 0x5F */ PLAYER_CSACTION_95,
|
||||||
/* 0x60 */ PLAYER_CSMODE_96,
|
/* 0x60 */ PLAYER_CSACTION_96,
|
||||||
/* 0x61 */ PLAYER_CSMODE_97,
|
/* 0x61 */ PLAYER_CSACTION_97,
|
||||||
/* 0x62 */ PLAYER_CSMODE_98,
|
/* 0x62 */ PLAYER_CSACTION_98,
|
||||||
/* 0x63 */ PLAYER_CSMODE_99,
|
/* 0x63 */ PLAYER_CSACTION_99,
|
||||||
/* 0x64 */ PLAYER_CSMODE_100,
|
/* 0x64 */ PLAYER_CSACTION_100,
|
||||||
/* 0x65 */ PLAYER_CSMODE_101,
|
/* 0x65 */ PLAYER_CSACTION_101,
|
||||||
/* 0x66 */ PLAYER_CSMODE_102,
|
/* 0x66 */ PLAYER_CSACTION_102,
|
||||||
/* 0x67 */ PLAYER_CSMODE_MAX
|
/* 0x67 */ PLAYER_CSACTION_MAX
|
||||||
} PlayerCutsceneMode;
|
} PlayerCsAction;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
/* 0x00 */ PLAYER_CUEID_NONE,
|
||||||
|
/* 0x01 */ PLAYER_CUEID_1,
|
||||||
|
/* 0x02 */ PLAYER_CUEID_2,
|
||||||
|
/* 0x03 */ PLAYER_CUEID_3,
|
||||||
|
/* 0x04 */ PLAYER_CUEID_4,
|
||||||
|
/* 0x05 */ PLAYER_CUEID_5,
|
||||||
|
/* 0x06 */ PLAYER_CUEID_6,
|
||||||
|
/* 0x07 */ PLAYER_CUEID_7,
|
||||||
|
/* 0x08 */ PLAYER_CUEID_8,
|
||||||
|
/* 0x09 */ PLAYER_CUEID_9,
|
||||||
|
/* 0x0A */ PLAYER_CUEID_10,
|
||||||
|
/* 0x0B */ PLAYER_CUEID_11,
|
||||||
|
/* 0x0C */ PLAYER_CUEID_12,
|
||||||
|
/* 0x0D */ PLAYER_CUEID_13,
|
||||||
|
/* 0x0E */ PLAYER_CUEID_14,
|
||||||
|
/* 0x0F */ PLAYER_CUEID_15,
|
||||||
|
/* 0x10 */ PLAYER_CUEID_16,
|
||||||
|
/* 0x11 */ PLAYER_CUEID_17,
|
||||||
|
/* 0x12 */ PLAYER_CUEID_18,
|
||||||
|
/* 0x13 */ PLAYER_CUEID_19,
|
||||||
|
/* 0x14 */ PLAYER_CUEID_20,
|
||||||
|
/* 0x15 */ PLAYER_CUEID_21,
|
||||||
|
/* 0x16 */ PLAYER_CUEID_22,
|
||||||
|
/* 0x17 */ PLAYER_CUEID_23,
|
||||||
|
/* 0x18 */ PLAYER_CUEID_24,
|
||||||
|
/* 0x19 */ PLAYER_CUEID_25,
|
||||||
|
/* 0x1A */ PLAYER_CUEID_26,
|
||||||
|
/* 0x1B */ PLAYER_CUEID_27,
|
||||||
|
/* 0x1C */ PLAYER_CUEID_28,
|
||||||
|
/* 0x1D */ PLAYER_CUEID_29,
|
||||||
|
/* 0x1E */ PLAYER_CUEID_30,
|
||||||
|
/* 0x1F */ PLAYER_CUEID_31,
|
||||||
|
/* 0x20 */ PLAYER_CUEID_32,
|
||||||
|
/* 0x21 */ PLAYER_CUEID_33,
|
||||||
|
/* 0x22 */ PLAYER_CUEID_34,
|
||||||
|
/* 0x23 */ PLAYER_CUEID_35,
|
||||||
|
/* 0x24 */ PLAYER_CUEID_36,
|
||||||
|
/* 0x25 */ PLAYER_CUEID_37,
|
||||||
|
/* 0x26 */ PLAYER_CUEID_38,
|
||||||
|
/* 0x27 */ PLAYER_CUEID_39,
|
||||||
|
/* 0x28 */ PLAYER_CUEID_40,
|
||||||
|
/* 0x29 */ PLAYER_CUEID_41,
|
||||||
|
/* 0x2A */ PLAYER_CUEID_42,
|
||||||
|
/* 0x2B */ PLAYER_CUEID_43,
|
||||||
|
/* 0x2C */ PLAYER_CUEID_44,
|
||||||
|
/* 0x2D */ PLAYER_CUEID_45,
|
||||||
|
/* 0x2E */ PLAYER_CUEID_46,
|
||||||
|
/* 0x2F */ PLAYER_CUEID_47,
|
||||||
|
/* 0x30 */ PLAYER_CUEID_48,
|
||||||
|
/* 0x31 */ PLAYER_CUEID_49,
|
||||||
|
/* 0x32 */ PLAYER_CUEID_50,
|
||||||
|
/* 0x33 */ PLAYER_CUEID_51,
|
||||||
|
/* 0x34 */ PLAYER_CUEID_52,
|
||||||
|
/* 0x35 */ PLAYER_CUEID_53,
|
||||||
|
/* 0x36 */ PLAYER_CUEID_54,
|
||||||
|
/* 0x37 */ PLAYER_CUEID_55,
|
||||||
|
/* 0x38 */ PLAYER_CUEID_56,
|
||||||
|
/* 0x39 */ PLAYER_CUEID_57,
|
||||||
|
/* 0x3A */ PLAYER_CUEID_58,
|
||||||
|
/* 0x3B */ PLAYER_CUEID_59,
|
||||||
|
/* 0x3C */ PLAYER_CUEID_60,
|
||||||
|
/* 0x3D */ PLAYER_CUEID_61,
|
||||||
|
/* 0x3E */ PLAYER_CUEID_62,
|
||||||
|
/* 0x3F */ PLAYER_CUEID_63,
|
||||||
|
/* 0x40 */ PLAYER_CUEID_64,
|
||||||
|
/* 0x41 */ PLAYER_CUEID_65,
|
||||||
|
/* 0x42 */ PLAYER_CUEID_66,
|
||||||
|
/* 0x43 */ PLAYER_CUEID_67,
|
||||||
|
/* 0x44 */ PLAYER_CUEID_68,
|
||||||
|
/* 0x45 */ PLAYER_CUEID_69,
|
||||||
|
/* 0x46 */ PLAYER_CUEID_70,
|
||||||
|
/* 0x47 */ PLAYER_CUEID_71,
|
||||||
|
/* 0x48 */ PLAYER_CUEID_72,
|
||||||
|
/* 0x49 */ PLAYER_CUEID_73,
|
||||||
|
/* 0x4A */ PLAYER_CUEID_74,
|
||||||
|
/* 0x4B */ PLAYER_CUEID_75,
|
||||||
|
/* 0x4C */ PLAYER_CUEID_76,
|
||||||
|
/* 0x4D */ PLAYER_CUEID_77,
|
||||||
|
/* 0x4E */ PLAYER_CUEID_MAX
|
||||||
|
} PlayerCueId;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
/* 0 */ PLAYER_LEDGE_CLIMB_NONE,
|
/* 0 */ PLAYER_LEDGE_CLIMB_NONE,
|
||||||
|
@ -587,7 +669,7 @@ typedef struct {
|
||||||
#define PLAYER_STATE3_7 (1 << 7)
|
#define PLAYER_STATE3_7 (1 << 7)
|
||||||
|
|
||||||
typedef void (*PlayerActionFunc)(struct Player*, struct PlayState*);
|
typedef void (*PlayerActionFunc)(struct Player*, struct PlayState*);
|
||||||
typedef s32 (*ItemActionFunc)(struct Player*, struct PlayState*);
|
typedef s32 (*UpperActionFunc)(struct Player*, struct PlayState*);
|
||||||
typedef void (*PlayerFuncA74)(struct PlayState*, struct Player*);
|
typedef void (*PlayerFuncA74)(struct PlayState*, struct Player*);
|
||||||
|
|
||||||
typedef struct Player {
|
typedef struct Player {
|
||||||
|
@ -640,16 +722,19 @@ typedef struct Player {
|
||||||
/* 0x043C */ s8 mountSide;
|
/* 0x043C */ s8 mountSide;
|
||||||
/* 0x043D */ char unk_43D[0x003];
|
/* 0x043D */ char unk_43D[0x003];
|
||||||
/* 0x0440 */ Actor* rideActor;
|
/* 0x0440 */ Actor* rideActor;
|
||||||
/* 0x0444 */ u8 csMode;
|
/* 0x0444 */ u8 csAction;
|
||||||
/* 0x0445 */ u8 prevCsMode;
|
/* 0x0445 */ u8 prevCsAction;
|
||||||
/* 0x0446 */ u8 cueId;
|
/* 0x0446 */ u8 cueId;
|
||||||
/* 0x0447 */ u8 unk_447;
|
/* 0x0447 */ u8 unk_447;
|
||||||
/* 0x0448 */ Actor* unk_448;
|
/* 0x0448 */ Actor* csActor; // Actor involved in a `csAction`. Typically the actor that invoked the cutscene.
|
||||||
/* 0x044C */ char unk_44C[0x004];
|
/* 0x044C */ char unk_44C[0x004];
|
||||||
/* 0x0450 */ Vec3f unk_450;
|
/* 0x0450 */ Vec3f unk_450;
|
||||||
/* 0x045C */ Vec3f unk_45C;
|
/* 0x045C */ Vec3f unk_45C;
|
||||||
/* 0x0468 */ char unk_468[0x002];
|
/* 0x0468 */ char unk_468[0x002];
|
||||||
/* 0x046A */ s16 doorBgCamIndex;
|
/* 0x046A */ union {
|
||||||
|
s16 haltActorsDuringCsAction; // If true, halt actors belonging to certain categories during a `csAction`
|
||||||
|
s16 slidingDoorBgCamIndex; // `BgCamIndex` used during a sliding door cutscene
|
||||||
|
} cv; // "Cutscene Variable": context dependent variable that has different meanings depending on what function is called
|
||||||
/* 0x046C */ s16 subCamId;
|
/* 0x046C */ s16 subCamId;
|
||||||
/* 0x046E */ char unk_46E[0x02A];
|
/* 0x046E */ char unk_46E[0x02A];
|
||||||
/* 0x0498 */ ColliderCylinder cylinder;
|
/* 0x0498 */ ColliderCylinder cylinder;
|
||||||
|
@ -688,11 +773,11 @@ typedef struct Player {
|
||||||
/* 0x06C0 */ s16 unk_6C0;
|
/* 0x06C0 */ s16 unk_6C0;
|
||||||
/* 0x06C2 */ s16 unk_6C2;
|
/* 0x06C2 */ s16 unk_6C2;
|
||||||
/* 0x06C4 */ f32 unk_6C4;
|
/* 0x06C4 */ f32 unk_6C4;
|
||||||
/* 0x06C8 */ SkelAnime skelAnimeUpper;
|
/* 0x06C8 */ SkelAnime upperSkelAnime;
|
||||||
/* 0x070C */ Vec3s jointTableUpper[PLAYER_LIMB_BUF_COUNT];
|
/* 0x070C */ Vec3s upperJointTable[PLAYER_LIMB_BUF_COUNT];
|
||||||
/* 0x079C */ Vec3s morphTableUpper[PLAYER_LIMB_BUF_COUNT];
|
/* 0x079C */ Vec3s upperMorphTable[PLAYER_LIMB_BUF_COUNT];
|
||||||
/* 0x082C */ ItemActionFunc itemActionFunc;
|
/* 0x082C */ UpperActionFunc upperActionFunc;
|
||||||
/* 0x0830 */ f32 skelAnimeUpperBlendWeight;
|
/* 0x0830 */ f32 upperAnimBlendWeight;
|
||||||
/* 0x0834 */ s16 unk_834;
|
/* 0x0834 */ s16 unk_834;
|
||||||
/* 0x0836 */ s8 unk_836;
|
/* 0x0836 */ s8 unk_836;
|
||||||
/* 0x0837 */ u8 unk_837;
|
/* 0x0837 */ u8 unk_837;
|
||||||
|
@ -707,8 +792,15 @@ typedef struct Player {
|
||||||
/* 0x0846 */ u8 unk_846;
|
/* 0x0846 */ u8 unk_846;
|
||||||
/* 0x0847 */ s8 unk_847[4];
|
/* 0x0847 */ s8 unk_847[4];
|
||||||
/* 0x084B */ s8 unk_84B[4];
|
/* 0x084B */ s8 unk_84B[4];
|
||||||
/* 0x084F */ s8 actionVar1; // context dependent variable that has different meanings depending on what action is currently running
|
|
||||||
/* 0x0850 */ s16 actionVar2; // context dependent variable that has different meanings depending on what action is currently running
|
/* 0x084F */ union {
|
||||||
|
s8 actionVar1;
|
||||||
|
} av1; // "Action Variable 1": context dependent variable that has different meanings depending on what action is currently running
|
||||||
|
|
||||||
|
/* 0x0850 */ union {
|
||||||
|
s16 actionVar2;
|
||||||
|
} av2; // "Action Variable 2": context dependent variable that has different meanings depending on what action is currently running
|
||||||
|
|
||||||
/* 0x0854 */ f32 unk_854;
|
/* 0x0854 */ f32 unk_854;
|
||||||
/* 0x0858 */ f32 unk_858;
|
/* 0x0858 */ f32 unk_858;
|
||||||
/* 0x085C */ f32 unk_85C; // stick length among other things
|
/* 0x085C */ f32 unk_85C; // stick length among other things
|
||||||
|
|
|
@ -38,9 +38,6 @@ typedef struct {
|
||||||
/* 0x01 */ u8 room;
|
/* 0x01 */ u8 room;
|
||||||
} Spawn;
|
} Spawn;
|
||||||
|
|
||||||
// TODO: ZAPD Compatibility
|
|
||||||
typedef Spawn EntranceEntry;
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/* 0x00 */ u8 count; // number of points in the path
|
/* 0x00 */ u8 count; // number of points in the path
|
||||||
/* 0x04 */ Vec3s* points; // Segment Address to the array of points
|
/* 0x04 */ Vec3s* points; // Segment Address to the array of points
|
||||||
|
@ -142,17 +139,6 @@ typedef union {
|
||||||
RoomShapeCullable cullable;
|
RoomShapeCullable cullable;
|
||||||
} RoomShape; // "Ground Shape"
|
} RoomShape; // "Ground Shape"
|
||||||
|
|
||||||
// ZAPD compatibility typedefs
|
|
||||||
// TODO: Remove when ZAPD adds support for them
|
|
||||||
typedef RoomShapeDListsEntry PolygonDlist;
|
|
||||||
typedef RoomShapeNormal PolygonType0;
|
|
||||||
typedef RoomShapeImageSingle MeshHeader1Single;
|
|
||||||
typedef RoomShapeImageMultiBgEntry BgImage;
|
|
||||||
typedef RoomShapeImageMulti MeshHeader1Multi;
|
|
||||||
typedef RoomShapeCullableEntry PolygonDlist2;
|
|
||||||
typedef RoomShapeCullable PolygonType2;
|
|
||||||
#define SCENE_CMD_MESH SCENE_CMD_ROOM_SHAPE
|
|
||||||
|
|
||||||
#define ROOM_DRAW_OPA (1 << 0)
|
#define ROOM_DRAW_OPA (1 << 0)
|
||||||
#define ROOM_DRAW_XLU (1 << 1)
|
#define ROOM_DRAW_XLU (1 << 1)
|
||||||
|
|
||||||
|
@ -459,7 +445,6 @@ typedef enum {
|
||||||
#define SCENE_CAM_TYPE_SHOOTING_GALLERY 0x50 // Unreferenced in code, and used only by the main layer of the shooting gallery scene
|
#define SCENE_CAM_TYPE_SHOOTING_GALLERY 0x50 // Unreferenced in code, and used only by the main layer of the shooting gallery scene
|
||||||
|
|
||||||
// navi hints
|
// navi hints
|
||||||
// TODO: make ZAPD use this enum for `SCENE_CMD_SPECIAL_FILES`
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
NAVI_QUEST_HINTS_NONE,
|
NAVI_QUEST_HINTS_NONE,
|
||||||
NAVI_QUEST_HINTS_OVERWORLD,
|
NAVI_QUEST_HINTS_OVERWORLD,
|
||||||
|
|
|
@ -43,13 +43,6 @@ typedef struct {
|
||||||
/* 0x08 */ Gfx* dlist;
|
/* 0x08 */ Gfx* dlist;
|
||||||
} SkinAnimatedLimbData; // size = 0xC
|
} SkinAnimatedLimbData; // size = 0xC
|
||||||
|
|
||||||
// ZAPD compatibility typedefs
|
|
||||||
// TODO: Remove when ZAPD adds support for them
|
|
||||||
typedef SkinVertex Struct_800A57C0;
|
|
||||||
typedef SkinTransformation Struct_800A598C_2;
|
|
||||||
typedef SkinAnimatedLimbData Struct_800A5E28;
|
|
||||||
typedef SkinLimbModif Struct_800A598C;
|
|
||||||
|
|
||||||
#define SKIN_LIMB_TYPE_ANIMATED 4
|
#define SKIN_LIMB_TYPE_ANIMATED 4
|
||||||
#define SKIN_LIMB_TYPE_NORMAL 11
|
#define SKIN_LIMB_TYPE_NORMAL 11
|
||||||
|
|
||||||
|
|
8
spec
8
spec
|
@ -26,7 +26,7 @@ beginseg
|
||||||
include "build/src/boot/mio0.o"
|
include "build/src/boot/mio0.o"
|
||||||
include "build/src/boot/stackcheck.o"
|
include "build/src/boot/stackcheck.o"
|
||||||
include "build/src/boot/logutils.o"
|
include "build/src/boot/logutils.o"
|
||||||
include "build/src/libultra/rmon/sprintf.o"
|
include "build/src/libultra/libc/sprintf.o"
|
||||||
include "build/src/libultra/io/piacs.o"
|
include "build/src/libultra/io/piacs.o"
|
||||||
include "build/src/libultra/os/sendmesg.o"
|
include "build/src/libultra/os/sendmesg.o"
|
||||||
include "build/src/libultra/os/stopthread.o"
|
include "build/src/libultra/os/stopthread.o"
|
||||||
|
@ -57,7 +57,7 @@ beginseg
|
||||||
include "build/src/libultra/os/probetlb.o"
|
include "build/src/libultra/os/probetlb.o"
|
||||||
include "build/src/libultra/os/getmemsize.o"
|
include "build/src/libultra/os/getmemsize.o"
|
||||||
include "build/src/libultra/os/seteventmesg.o"
|
include "build/src/libultra/os/seteventmesg.o"
|
||||||
include "build/src/libultra/rmon/xprintf.o"
|
include "build/src/libultra/libc/xprintf.o"
|
||||||
include "build/src/libultra/os/unmaptlball.o"
|
include "build/src/libultra/os/unmaptlball.o"
|
||||||
include "build/src/libultra/io/epidma.o"
|
include "build/src/libultra/io/epidma.o"
|
||||||
include "build/src/libultra/libc/string.o"
|
include "build/src/libultra/libc/string.o"
|
||||||
|
@ -96,9 +96,9 @@ beginseg
|
||||||
include "build/src/libultra/os/yieldthread.o"
|
include "build/src/libultra/os/yieldthread.o"
|
||||||
include "build/src/libultra/os/getcause.o"
|
include "build/src/libultra/os/getcause.o"
|
||||||
include "build/src/libultra/io/epirawwrite.o"
|
include "build/src/libultra/io/epirawwrite.o"
|
||||||
include "build/src/libultra/rmon/xlitob.o"
|
include "build/src/libultra/libc/xlitob.o"
|
||||||
include "build/src/libultra/libc/ldiv.o"
|
include "build/src/libultra/libc/ldiv.o"
|
||||||
include "build/src/libultra/rmon/xldtob.o"
|
include "build/src/libultra/libc/xldtob.o"
|
||||||
include "build/src/boot/build.o"
|
include "build/src/boot/build.o"
|
||||||
include "build/src/libultra/io/sirawwrite.o"
|
include "build/src/libultra/io/sirawwrite.o"
|
||||||
include "build/src/libultra/io/vimgr.o"
|
include "build/src/libultra/io/vimgr.o"
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
|
||||||
NORETURN void __assert(const char* exp, const char* file, s32 line) {
|
NORETURN void __assert(const char* assertion, const char* file, int line) {
|
||||||
char msg[256];
|
char msg[256];
|
||||||
|
|
||||||
osSyncPrintf("Assertion failed: %s, file %s, line %d, thread %d\n", exp, file, line, osGetThreadId(NULL));
|
osSyncPrintf("Assertion failed: %s, file %s, line %d, thread %d\n", assertion, file, line, osGetThreadId(NULL));
|
||||||
sprintf(msg, "ASSERT: %s:%d(%d)", file, line, osGetThreadId(NULL));
|
sprintf(msg, "ASSERT: %s:%d(%d)", file, line, osGetThreadId(NULL));
|
||||||
Fault_AddHungupAndCrashImpl(msg, exp);
|
Fault_AddHungupAndCrashImpl(msg, assertion);
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ void rmonPrintf(const char* fmt, ...) {
|
||||||
va_end(args);
|
va_end(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
void* is_proutSyncPrintf(void* arg, const char* str, u32 count) {
|
void* is_proutSyncPrintf(void* arg, const char* str, size_t count) {
|
||||||
u32 data;
|
u32 data;
|
||||||
s32 pos;
|
s32 pos;
|
||||||
s32 start;
|
s32 start;
|
||||||
|
|
|
@ -130,7 +130,7 @@ s32 DmaMgr_DmaRomToRam(uintptr_t rom, void* ram, size_t size) {
|
||||||
}
|
}
|
||||||
|
|
||||||
size -= buffSize;
|
size -= buffSize;
|
||||||
rom = rom + buffSize;
|
rom += buffSize;
|
||||||
ram = (u8*)ram + buffSize;
|
ram = (u8*)ram + buffSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "fp.h"
|
|
||||||
|
|
||||||
s32 gUseAtanContFrac;
|
s32 gUseAtanContFrac;
|
||||||
|
|
||||||
|
|
|
@ -2369,6 +2369,6 @@ void func_800BB060(void) {
|
||||||
sDebugCamAnim.unk_0A = 0;
|
sDebugCamAnim.unk_0A = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_800BB06C(void) {
|
int func_800BB06C(void) {
|
||||||
return sDebugCamPtr->unk_00 == 2 && sDebugCamAnim.unk_0A != 0;
|
return sDebugCamPtr->unk_00 == 2 && sDebugCamAnim.unk_0A != 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -242,7 +242,7 @@ void FaultDrawer_FillScreen(void) {
|
||||||
FaultDrawer_SetCursor(sFaultDrawer.xStart, sFaultDrawer.yStart);
|
FaultDrawer_SetCursor(sFaultDrawer.xStart, sFaultDrawer.yStart);
|
||||||
}
|
}
|
||||||
|
|
||||||
void* FaultDrawer_PrintCallback(void* arg, const char* str, u32 count) {
|
void* FaultDrawer_PrintCallback(void* arg, const char* str, size_t count) {
|
||||||
for (; count != 0; count--, str++) {
|
for (; count != 0; count--, str++) {
|
||||||
s32 curXStart;
|
s32 curXStart;
|
||||||
s32 curXEnd;
|
s32 curXEnd;
|
||||||
|
|
|
@ -301,7 +301,7 @@ void GfxPrint_PrintString(GfxPrint* this, const char* str) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void* GfxPrint_Callback(void* arg, const char* str, u32 size) {
|
void* GfxPrint_Callback(void* arg, const char* str, size_t size) {
|
||||||
GfxPrint* this = arg;
|
GfxPrint* this = arg;
|
||||||
|
|
||||||
GfxPrint_PrintStringWithSize(this, str, sizeof(char), size);
|
GfxPrint_PrintStringWithSize(this, str, sizeof(char), size);
|
||||||
|
|
|
@ -46,7 +46,7 @@ s32 Overlay_Load(uintptr_t vromStart, uintptr_t vromEnd, void* vramStart, void*
|
||||||
// "Clear BSS area (% 08x-% 08x)"
|
// "Clear BSS area (% 08x-% 08x)"
|
||||||
osSyncPrintf("BSS領域をクリアします(%08x-%08x)\n", end, end + ovlRelocs->bssSize);
|
osSyncPrintf("BSS領域をクリアします(%08x-%08x)\n", end, end + ovlRelocs->bssSize);
|
||||||
}
|
}
|
||||||
bzero((void*)end, ovlRelocs->bssSize);
|
bzero((void*)end, (s32)ovlRelocs->bssSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
size = (uintptr_t)&ovlRelocs->relocations[ovlRelocs->nRelocations] - (uintptr_t)ovlRelocs;
|
size = (uintptr_t)&ovlRelocs->relocations[ovlRelocs->nRelocations] - (uintptr_t)ovlRelocs;
|
||||||
|
|
|
@ -74,15 +74,26 @@ SpeedMeterTimeEntry sSpeedMeterTimeEntryArray[] = {
|
||||||
{ &gGraphUpdatePeriod, 0, 10, GPACK_RGBA5551(255, 0, 255, 1) },
|
{ &gGraphUpdatePeriod, 0, 10, GPACK_RGBA5551(255, 0, 255, 1) },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
/* 0x00 */ s32 maxval;
|
||||||
|
/* 0x04 */ s32 val;
|
||||||
|
/* 0x08 */ u16 backColor;
|
||||||
|
/* 0x0A */ u16 foreColor;
|
||||||
|
/* 0x0C */ s32 ulx;
|
||||||
|
/* 0x10 */ s32 lrx;
|
||||||
|
/* 0x14 */ s32 uly;
|
||||||
|
/* 0x18 */ s32 lry;
|
||||||
|
} SpeedMeterAllocEntry; // size = 0x1C
|
||||||
|
|
||||||
#define gDrawRect(gfx, color, ulx, uly, lrx, lry) \
|
#define gDrawRect(gfx, color, ulx, uly, lrx, lry) \
|
||||||
gDPPipeSync(gfx); \
|
gDPPipeSync(gfx); \
|
||||||
gDPSetFillColor(gfx, ((color) << 16) | (color)); \
|
gDPSetFillColor(gfx, ((color) << 16) | (color)); \
|
||||||
gDPFillRectangle(gfx, (ulx), (uly), (lrx), (lry)); \
|
gDPFillRectangle(gfx, (ulx), (uly), (lrx), (lry)); \
|
||||||
gDPPipeSync(gfx)
|
gDPPipeSync(gfx)
|
||||||
|
|
||||||
void SpeedMeter_InitImpl(SpeedMeter* this, u32 arg1, u32 y) {
|
void SpeedMeter_InitImpl(SpeedMeter* this, u32 x, u32 y) {
|
||||||
LogUtils_CheckNullPointer("this", this, "../speed_meter.c", 181);
|
LogUtils_CheckNullPointer("this", this, "../speed_meter.c", 181);
|
||||||
this->unk_18 = arg1;
|
this->x = x;
|
||||||
this->y = y;
|
this->y = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,7 +218,7 @@ void SpeedMeter_DrawAllocEntries(SpeedMeter* meter, GraphicsContext* gfxCtx, Gam
|
||||||
u32 ulx = 30;
|
u32 ulx = 30;
|
||||||
u32 lrx = 290;
|
u32 lrx = 290;
|
||||||
SpeedMeterAllocEntry entry;
|
SpeedMeterAllocEntry entry;
|
||||||
u32 pad2;
|
TwoHeadArena* tha;
|
||||||
s32 y;
|
s32 y;
|
||||||
TwoHeadGfxArena* thga;
|
TwoHeadGfxArena* thga;
|
||||||
u32 zeldaFreeMax;
|
u32 zeldaFreeMax;
|
||||||
|
@ -237,10 +248,9 @@ void SpeedMeter_DrawAllocEntries(SpeedMeter* meter, GraphicsContext* gfxCtx, Gam
|
||||||
y++;
|
y++;
|
||||||
}
|
}
|
||||||
|
|
||||||
thga = (TwoHeadGfxArena*)&state->tha;
|
tha = &state->tha;
|
||||||
//! @bug THA_GetRemaining call should be THGA_GetRemaining like the others below, harmless as-is
|
SpeedMeter_InitAllocEntry(&entry, tha->size, tha->size - THA_GetRemaining(tha), GPACK_RGBA5551(0, 0, 255, 1),
|
||||||
SpeedMeter_InitAllocEntry(&entry, thga->size, thga->size - THA_GetRemaining(&thga->tha),
|
GPACK_RGBA5551(0, 255, 0, 1), ulx, lrx, y, y);
|
||||||
GPACK_RGBA5551(0, 0, 255, 1), GPACK_RGBA5551(0, 255, 0, 1), ulx, lrx, y, y);
|
|
||||||
SpeedMeter_DrawAllocEntry(&entry, gfxCtx);
|
SpeedMeter_DrawAllocEntry(&entry, gfxCtx);
|
||||||
y++;
|
y++;
|
||||||
|
|
||||||
|
|
|
@ -1925,14 +1925,14 @@ s32 Math3D_SphVsSph(Sphere16* sphereA, Sphere16* sphereB) {
|
||||||
s32 Math3D_SphVsSphOverlap(Sphere16* sphereA, Sphere16* sphereB, f32* overlapSize) {
|
s32 Math3D_SphVsSphOverlap(Sphere16* sphereA, Sphere16* sphereB, f32* overlapSize) {
|
||||||
f32 centerDist;
|
f32 centerDist;
|
||||||
|
|
||||||
return Math3D_SphVsSphOverlapCenter(sphereA, sphereB, overlapSize, ¢erDist);
|
return Math3D_SphVsSphOverlapCenterDist(sphereA, sphereB, overlapSize, ¢erDist);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Determines if two spheres are touching The distance from the centers is placed in `centerDist`,
|
* Determines if two spheres are touching The distance from the centers is placed in `centerDist`,
|
||||||
* and the amount that they're overlapping is placed in `overlapSize`
|
* and the amount that they're overlapping is placed in `overlapSize`
|
||||||
*/
|
*/
|
||||||
s32 Math3D_SphVsSphOverlapCenter(Sphere16* sphereA, Sphere16* sphereB, f32* overlapSize, f32* centerDist) {
|
s32 Math3D_SphVsSphOverlapCenterDist(Sphere16* sphereA, Sphere16* sphereB, f32* overlapSize, f32* centerDist) {
|
||||||
Vec3f diff;
|
Vec3f diff;
|
||||||
|
|
||||||
diff.x = (f32)sphereA->center.x - (f32)sphereB->center.x;
|
diff.x = (f32)sphereA->center.x - (f32)sphereB->center.x;
|
||||||
|
@ -1951,9 +1951,9 @@ s32 Math3D_SphVsSphOverlapCenter(Sphere16* sphereA, Sphere16* sphereB, f32* over
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if `sph` and `cyl` are touching, output the amount of overlap to `overlapSize`
|
* Checks if `sph` and `cyl` are touching, output the amount of xz overlap to `overlapSize`
|
||||||
*/
|
*/
|
||||||
s32 Math3D_SphVsCylOverlapDist(Sphere16* sph, Cylinder16* cyl, f32* overlapSize) {
|
s32 Math3D_SphVsCylOverlap(Sphere16* sph, Cylinder16* cyl, f32* overlapSize) {
|
||||||
f32 centerDist;
|
f32 centerDist;
|
||||||
|
|
||||||
return Math3D_SphVsCylOverlapCenterDist(sph, cyl, overlapSize, ¢erDist);
|
return Math3D_SphVsCylOverlapCenterDist(sph, cyl, overlapSize, ¢erDist);
|
||||||
|
@ -1961,7 +1961,7 @@ s32 Math3D_SphVsCylOverlapDist(Sphere16* sph, Cylinder16* cyl, f32* overlapSize)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if `sph` and `cyl` are touching, output the xz distance of the centers to `centerDist`, and the amount of
|
* Checks if `sph` and `cyl` are touching, output the xz distance of the centers to `centerDist`, and the amount of
|
||||||
* overlap to `overlapSize`
|
* xz overlap to `overlapSize`
|
||||||
*/
|
*/
|
||||||
s32 Math3D_SphVsCylOverlapCenterDist(Sphere16* sph, Cylinder16* cyl, f32* overlapSize, f32* centerDist) {
|
s32 Math3D_SphVsCylOverlapCenterDist(Sphere16* sph, Cylinder16* cyl, f32* overlapSize, f32* centerDist) {
|
||||||
static Cylinderf cylf;
|
static Cylinderf cylf;
|
||||||
|
@ -2007,22 +2007,20 @@ s32 Math3D_SphVsCylOverlapCenterDist(Sphere16* sph, Cylinder16* cyl, f32* overla
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* returns 1 if cylinder `ca` is outside cylinder `cb`.
|
* Checks if `ca` and `cb` are touching, output the amount of xz overlap to `overlapSize`
|
||||||
* Sets `deadSpace` to the mininum space between the cylinders not occupied by the other.
|
|
||||||
*/
|
*/
|
||||||
s32 Math3D_CylOutsideCyl(Cylinder16* ca, Cylinder16* cb, f32* deadSpace) {
|
s32 Math3D_CylVsCylOverlap(Cylinder16* ca, Cylinder16* cb, f32* overlapSize) {
|
||||||
f32 xzDist;
|
f32 xzDist;
|
||||||
|
|
||||||
return Math3D_CylOutsideCylDist(ca, cb, deadSpace, &xzDist);
|
return Math3D_CylVsCylOverlapCenterDist(ca, cb, overlapSize, &xzDist);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* returns 1 if cylinder `ca` is outside cylinder `cb`.
|
* Checks if `ca` and `cb` are touching, output the xz distance of the centers to `centerDist`, and the amount of
|
||||||
* Sets `xzDist` to the xz distance between the centers of the cylinders.
|
* xz overlap to `overlapSize`
|
||||||
* Sets `deadSpace` to the minimum space between the cylinders not occupied by the other.
|
|
||||||
*/
|
*/
|
||||||
s32 Math3D_CylOutsideCylDist(Cylinder16* ca, Cylinder16* cb, f32* deadSpace, f32* xzDist) {
|
s32 Math3D_CylVsCylOverlapCenterDist(Cylinder16* ca, Cylinder16* cb, f32* overlapSize, f32* centerDist) {
|
||||||
static Cylinderf caf;
|
static Cylinderf caf;
|
||||||
static Cylinderf cbf;
|
static Cylinderf cbf;
|
||||||
|
|
||||||
|
@ -2036,10 +2034,10 @@ s32 Math3D_CylOutsideCylDist(Cylinder16* ca, Cylinder16* cb, f32* deadSpace, f32
|
||||||
cbf.yShift = cb->yShift;
|
cbf.yShift = cb->yShift;
|
||||||
cbf.height = cb->height;
|
cbf.height = cb->height;
|
||||||
|
|
||||||
*xzDist = sqrtf(SQ(caf.pos.x - cbf.pos.x) + SQ(caf.pos.z - cbf.pos.z));
|
*centerDist = sqrtf(SQ(caf.pos.x - cbf.pos.x) + SQ(caf.pos.z - cbf.pos.z));
|
||||||
|
|
||||||
// The combined radix are within the xz distance
|
// The combined radii are within the xz distance
|
||||||
if ((caf.radius + cbf.radius) < *xzDist) {
|
if ((caf.radius + cbf.radius) < *centerDist) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2049,7 +2047,7 @@ s32 Math3D_CylOutsideCylDist(Cylinder16* ca, Cylinder16* cb, f32* deadSpace, f32
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
*deadSpace = caf.radius + cbf.radius - *xzDist;
|
*overlapSize = caf.radius + cbf.radius - *centerDist;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -810,7 +810,7 @@ void Actor_Init(Actor* actor, PlayState* play) {
|
||||||
Actor_SetScale(actor, 0.01f);
|
Actor_SetScale(actor, 0.01f);
|
||||||
actor->targetMode = 3;
|
actor->targetMode = 3;
|
||||||
actor->minVelocityY = -20.0f;
|
actor->minVelocityY = -20.0f;
|
||||||
actor->xyzDistToPlayerSq = FLT_MAX;
|
actor->xyzDistToPlayerSq = MAXFLOAT;
|
||||||
actor->naviEnemyId = NAVI_ENEMY_NONE;
|
actor->naviEnemyId = NAVI_ENEMY_NONE;
|
||||||
actor->uncullZoneForward = 1000.0f;
|
actor->uncullZoneForward = 1000.0f;
|
||||||
actor->uncullZoneScale = 350.0f;
|
actor->uncullZoneScale = 350.0f;
|
||||||
|
@ -1000,15 +1000,15 @@ f32 func_8002DCE4(Player* player) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_8002DD6C(Player* player) {
|
int func_8002DD6C(Player* player) {
|
||||||
return player->stateFlags1 & PLAYER_STATE1_3;
|
return player->stateFlags1 & PLAYER_STATE1_3;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_8002DD78(Player* player) {
|
int func_8002DD78(Player* player) {
|
||||||
return func_8002DD6C(player) && player->unk_834;
|
return func_8002DD6C(player) && player->unk_834;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_8002DDA8(PlayState* play) {
|
int func_8002DDA8(PlayState* play) {
|
||||||
Player* player = GET_PLAYER(play);
|
Player* player = GET_PLAYER(play);
|
||||||
|
|
||||||
return (player->stateFlags1 & PLAYER_STATE1_11) || func_8002DD78(player);
|
return (player->stateFlags1 & PLAYER_STATE1_11) || func_8002DD78(player);
|
||||||
|
@ -1049,29 +1049,54 @@ void Actor_MountHorse(PlayState* play, Player* player, Actor* horse) {
|
||||||
horse->child = &player->actor;
|
horse->child = &player->actor;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_8002DEEC(Player* player) {
|
int func_8002DEEC(Player* player) {
|
||||||
return (player->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (player->csMode != PLAYER_CSMODE_NONE);
|
return (player->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (player->csAction != PLAYER_CSACTION_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_8002DF18(PlayState* play, Player* player) {
|
void func_8002DF18(PlayState* play, Player* player) {
|
||||||
func_8006DC68(play, player);
|
func_8006DC68(play, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_8002DF38(PlayState* play, Actor* actor, u8 csMode) {
|
/**
|
||||||
|
* Sets a Player Cutscene Action specified by `csAction`.
|
||||||
|
* There are no safety checks to see if Player is already in some form of a cutscene state.
|
||||||
|
* This will instantly take effect.
|
||||||
|
*
|
||||||
|
* `haltActorsDuringCsAction` being set to false in this function means that all actors will
|
||||||
|
* be able to update while Player is performing the cutscene action.
|
||||||
|
*
|
||||||
|
* Note: due to how player implements initializing the cutscene action state, `haltActorsDuringCsAction`
|
||||||
|
* will only be considered the first time player starts a `csAction`.
|
||||||
|
* Player must leave the cutscene action state and enter it again before halting actors can be toggled.
|
||||||
|
*/
|
||||||
|
s32 Player_SetCsAction(PlayState* play, Actor* csActor, u8 csAction) {
|
||||||
Player* player = GET_PLAYER(play);
|
Player* player = GET_PLAYER(play);
|
||||||
|
|
||||||
player->csMode = csMode;
|
player->csAction = csAction;
|
||||||
player->unk_448 = actor;
|
player->csActor = csActor;
|
||||||
player->doorBgCamIndex = 0;
|
player->cv.haltActorsDuringCsAction = false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_8002DF54(PlayState* play, Actor* actor, u8 csMode) {
|
/**
|
||||||
|
* Sets a Player Cutscene Action specified by `csAction`.
|
||||||
|
* There are no safety checks to see if Player is already in some form of a cutscene state.
|
||||||
|
* This will instantly take effect.
|
||||||
|
*
|
||||||
|
* `haltActorsDuringCsAction` being set to true in this function means that eventually `PLAYER_STATE1_29` will be set.
|
||||||
|
* This makes it so actors belonging to categories `ACTORCAT_ENEMY` and `ACTORCAT_MISC` will not update
|
||||||
|
* while Player is performing the cutscene action.
|
||||||
|
*
|
||||||
|
* Note: due to how player implements initializing the cutscene action state, `haltActorsDuringCsAction`
|
||||||
|
* will only be considered the first time player starts a `csAction`.
|
||||||
|
* Player must leave the cutscene action state and enter it again before halting actors can be toggled.
|
||||||
|
*/
|
||||||
|
s32 Player_SetCsActionWithHaltedActors(PlayState* play, Actor* csActor, u8 csAction) {
|
||||||
Player* player = GET_PLAYER(play);
|
Player* player = GET_PLAYER(play);
|
||||||
|
|
||||||
func_8002DF38(play, actor, csMode);
|
Player_SetCsAction(play, csActor, csAction);
|
||||||
player->doorBgCamIndex = 1;
|
player->cv.haltActorsDuringCsAction = true;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1468,7 +1493,7 @@ f32 func_8002EFC0(Actor* actor, Player* player, s16 arg2) {
|
||||||
|
|
||||||
if (player->unk_664 != NULL) {
|
if (player->unk_664 != NULL) {
|
||||||
if ((yawTempAbs > 0x4000) || (actor->flags & ACTOR_FLAG_27)) {
|
if ((yawTempAbs > 0x4000) || (actor->flags & ACTOR_FLAG_27)) {
|
||||||
return FLT_MAX;
|
return MAXFLOAT;
|
||||||
} else {
|
} else {
|
||||||
f32 ret =
|
f32 ret =
|
||||||
actor->xyzDistToPlayerSq - actor->xyzDistToPlayerSq * 0.8f * ((0x4000 - yawTempAbs) * (1.0f / 0x8000));
|
actor->xyzDistToPlayerSq - actor->xyzDistToPlayerSq * 0.8f * ((0x4000 - yawTempAbs) * (1.0f / 0x8000));
|
||||||
|
@ -1478,7 +1503,7 @@ f32 func_8002EFC0(Actor* actor, Player* player, s16 arg2) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (yawTempAbs > 0x2AAA) {
|
if (yawTempAbs > 0x2AAA) {
|
||||||
return FLT_MAX;
|
return MAXFLOAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
return actor->xyzDistToPlayerSq;
|
return actor->xyzDistToPlayerSq;
|
||||||
|
@ -1513,7 +1538,7 @@ s32 func_8002F0C8(Actor* actor, Player* player, s32 flag) {
|
||||||
f32 dist;
|
f32 dist;
|
||||||
|
|
||||||
if ((player->unk_664 == NULL) && (abs_var > 0x2AAA)) {
|
if ((player->unk_664 == NULL) && (abs_var > 0x2AAA)) {
|
||||||
dist = FLT_MAX;
|
dist = MAXFLOAT;
|
||||||
} else {
|
} else {
|
||||||
dist = actor->xyzDistToPlayerSq;
|
dist = actor->xyzDistToPlayerSq;
|
||||||
}
|
}
|
||||||
|
@ -2996,7 +3021,7 @@ Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, PlayState* play) {
|
||||||
return newHead;
|
return newHead;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_80032880(PlayState* play, Actor* actor) {
|
int func_80032880(PlayState* play, Actor* actor) {
|
||||||
s16 sp1E;
|
s16 sp1E;
|
||||||
s16 sp1C;
|
s16 sp1C;
|
||||||
|
|
||||||
|
@ -3067,7 +3092,7 @@ Actor* func_80032AF0(PlayState* play, ActorContext* actorCtx, Actor** actorPtr,
|
||||||
u8* entry;
|
u8* entry;
|
||||||
|
|
||||||
D_8015BBE8 = D_8015BBEC = NULL;
|
D_8015BBE8 = D_8015BBEC = NULL;
|
||||||
D_8015BBF0 = sbgmEnemyDistSq = FLT_MAX;
|
D_8015BBF0 = sbgmEnemyDistSq = MAXFLOAT;
|
||||||
D_8015BBF8 = 0x7FFFFFFF;
|
D_8015BBF8 = 0x7FFFFFFF;
|
||||||
|
|
||||||
if (!Player_InCsMode(play)) {
|
if (!Player_InCsMode(play)) {
|
||||||
|
|
|
@ -5263,14 +5263,14 @@ s32 Camera_Unique9(Camera* camera) {
|
||||||
} else if (ONEPOINT_CS_INIT_FIELD_IS_TYPE_HUD_VISIBILITY(rwData->curKeyFrame->initField)) {
|
} else if (ONEPOINT_CS_INIT_FIELD_IS_TYPE_HUD_VISIBILITY(rwData->curKeyFrame->initField)) {
|
||||||
Camera_UpdateInterface(
|
Camera_UpdateInterface(
|
||||||
CAM_INTERFACE_FIELD(CAM_LETTERBOX_IGNORE, rwData->curKeyFrame->initField, 0));
|
CAM_INTERFACE_FIELD(CAM_LETTERBOX_IGNORE, rwData->curKeyFrame->initField, 0));
|
||||||
} else { // initField is of type PlayerCsMode
|
} else { // initField is a PlayerCsAction
|
||||||
if ((camera->player->stateFlags1 & PLAYER_STATE1_27) &&
|
if ((camera->player->stateFlags1 & PLAYER_STATE1_27) &&
|
||||||
(player->currentBoots != PLAYER_BOOTS_IRON)) {
|
(player->currentBoots != PLAYER_BOOTS_IRON)) {
|
||||||
func_8002DF38(camera->play, camera->target, PLAYER_CSMODE_8);
|
Player_SetCsAction(camera->play, camera->target, PLAYER_CSACTION_8);
|
||||||
osSyncPrintf("camera: demo: player demo set WAIT\n");
|
osSyncPrintf("camera: demo: player demo set WAIT\n");
|
||||||
} else {
|
} else {
|
||||||
osSyncPrintf("camera: demo: player demo set %d\n", rwData->curKeyFrame->initField);
|
osSyncPrintf("camera: demo: player demo set %d\n", rwData->curKeyFrame->initField);
|
||||||
func_8002DF38(camera->play, camera->target, rwData->curKeyFrame->initField);
|
Player_SetCsAction(camera->play, camera->target, rwData->curKeyFrame->initField);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6236,14 +6236,14 @@ s32 Camera_Demo5(Camera* camera) {
|
||||||
framesDiff = camera->play->state.frames - sDemo5PrevAction12Frame;
|
framesDiff = camera->play->state.frames - sDemo5PrevAction12Frame;
|
||||||
if (player->stateFlags1 & PLAYER_STATE1_11) {
|
if (player->stateFlags1 & PLAYER_STATE1_11) {
|
||||||
// holding object over head.
|
// holding object over head.
|
||||||
func_8002DF54(camera->play, camera->target, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(camera->play, camera->target, PLAYER_CSACTION_8);
|
||||||
} else if (ABS(framesDiff) > 3000) {
|
} else if (ABS(framesDiff) > 3000) {
|
||||||
func_8002DF54(camera->play, camera->target, PLAYER_CSMODE_12);
|
Player_SetCsActionWithHaltedActors(camera->play, camera->target, PLAYER_CSACTION_12);
|
||||||
} else {
|
} else {
|
||||||
func_8002DF54(camera->play, camera->target, PLAYER_CSMODE_69);
|
Player_SetCsActionWithHaltedActors(camera->play, camera->target, PLAYER_CSACTION_69);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
func_8002DF54(camera->play, camera->target, PLAYER_CSMODE_1);
|
Player_SetCsActionWithHaltedActors(camera->play, camera->target, PLAYER_CSACTION_1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6305,7 +6305,7 @@ s32 Camera_Demo6(Camera* camera) {
|
||||||
FALLTHROUGH;
|
FALLTHROUGH;
|
||||||
case 1:
|
case 1:
|
||||||
if (stateTimers[camera->animState] < rwData->animTimer) {
|
if (stateTimers[camera->animState] < rwData->animTimer) {
|
||||||
func_8002DF54(camera->play, &camera->player->actor, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(camera->play, &camera->player->actor, PLAYER_CSACTION_8);
|
||||||
Actor_GetWorld(&focusPosRot, camFocus);
|
Actor_GetWorld(&focusPosRot, camFocus);
|
||||||
rwData->atTarget.x = focusPosRot.pos.x;
|
rwData->atTarget.x = focusPosRot.pos.x;
|
||||||
rwData->atTarget.y = focusPosRot.pos.y - 20.0f;
|
rwData->atTarget.y = focusPosRot.pos.y - 20.0f;
|
||||||
|
@ -7841,8 +7841,8 @@ void Camera_Finish(Camera* camera) {
|
||||||
player->actor.freezeTimer = 0;
|
player->actor.freezeTimer = 0;
|
||||||
player->stateFlags1 &= ~PLAYER_STATE1_29;
|
player->stateFlags1 &= ~PLAYER_STATE1_29;
|
||||||
|
|
||||||
if (player->csMode != PLAYER_CSMODE_NONE) {
|
if (player->csAction != PLAYER_CSACTION_NONE) {
|
||||||
func_8002DF54(camera->play, &player->actor, PLAYER_CSMODE_7);
|
Player_SetCsActionWithHaltedActors(camera->play, &player->actor, PLAYER_CSACTION_7);
|
||||||
osSyncPrintf("camera: player demo end!!\n");
|
osSyncPrintf("camera: player demo end!!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1745,8 +1745,8 @@ void CollisionCheck_AC_JntSphVsJntSph(PlayState* play, CollisionCheckContext* co
|
||||||
if (CollisionCheck_NoSharedFlags(&atItem->info, &acElem->info) == true) {
|
if (CollisionCheck_NoSharedFlags(&atItem->info, &acElem->info) == true) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (Math3D_SphVsSphOverlapCenter(&atItem->dim.worldSphere, &acElem->dim.worldSphere, &overlapSize,
|
if (Math3D_SphVsSphOverlapCenterDist(&atItem->dim.worldSphere, &acElem->dim.worldSphere, &overlapSize,
|
||||||
¢erDist) == true) {
|
¢erDist) == true) {
|
||||||
f32 acToHit;
|
f32 acToHit;
|
||||||
Vec3f hitPos;
|
Vec3f hitPos;
|
||||||
Vec3f atPos;
|
Vec3f atPos;
|
||||||
|
@ -2070,8 +2070,8 @@ void CollisionCheck_AC_QuadVsJntSph(PlayState* play, CollisionCheckContext* colC
|
||||||
void CollisionCheck_AC_CylVsCyl(PlayState* play, CollisionCheckContext* colChkCtx, Collider* colAT, Collider* colAC) {
|
void CollisionCheck_AC_CylVsCyl(PlayState* play, CollisionCheckContext* colChkCtx, Collider* colAT, Collider* colAC) {
|
||||||
ColliderCylinder* at = (ColliderCylinder*)colAT;
|
ColliderCylinder* at = (ColliderCylinder*)colAT;
|
||||||
ColliderCylinder* ac = (ColliderCylinder*)colAC;
|
ColliderCylinder* ac = (ColliderCylinder*)colAC;
|
||||||
f32 deadSpace;
|
f32 overlapSize;
|
||||||
f32 centerDistXZ;
|
f32 centerDist;
|
||||||
Vec3f hitPos;
|
Vec3f hitPos;
|
||||||
|
|
||||||
if (at->dim.radius > 0 && at->dim.height > 0 && ac->dim.radius > 0 && ac->dim.height > 0) {
|
if (at->dim.radius > 0 && at->dim.height > 0 && ac->dim.radius > 0 && ac->dim.height > 0) {
|
||||||
|
@ -2084,15 +2084,15 @@ void CollisionCheck_AC_CylVsCyl(PlayState* play, CollisionCheckContext* colChkCt
|
||||||
if (CollisionCheck_NoSharedFlags(&at->info, &ac->info) == true) {
|
if (CollisionCheck_NoSharedFlags(&at->info, &ac->info) == true) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Math3D_CylOutsideCylDist(&at->dim, &ac->dim, &deadSpace, ¢erDistXZ) == true) {
|
if (Math3D_CylVsCylOverlapCenterDist(&at->dim, &ac->dim, &overlapSize, ¢erDist) == true) {
|
||||||
Vec3f atPos;
|
Vec3f atPos;
|
||||||
Vec3f acPos;
|
Vec3f acPos;
|
||||||
f32 acToHit;
|
f32 acToHit;
|
||||||
|
|
||||||
Math_Vec3s_ToVec3f(&atPos, &at->dim.pos);
|
Math_Vec3s_ToVec3f(&atPos, &at->dim.pos);
|
||||||
Math_Vec3s_ToVec3f(&acPos, &ac->dim.pos);
|
Math_Vec3s_ToVec3f(&acPos, &ac->dim.pos);
|
||||||
if (!IS_ZERO(centerDistXZ)) {
|
if (!IS_ZERO(centerDist)) {
|
||||||
acToHit = ac->dim.radius / centerDistXZ;
|
acToHit = ac->dim.radius / centerDist;
|
||||||
hitPos.y = (f32)ac->dim.pos.y + ac->dim.yShift + ac->dim.height * 0.5f;
|
hitPos.y = (f32)ac->dim.pos.y + ac->dim.yShift + ac->dim.height * 0.5f;
|
||||||
hitPos.x = ((f32)at->dim.pos.x - ac->dim.pos.x) * acToHit + ac->dim.pos.x;
|
hitPos.x = ((f32)at->dim.pos.x - ac->dim.pos.x) * acToHit + ac->dim.pos.x;
|
||||||
hitPos.z = ((f32)at->dim.pos.z - ac->dim.pos.z) * acToHit + ac->dim.pos.z;
|
hitPos.z = ((f32)at->dim.pos.z - ac->dim.pos.z) * acToHit + ac->dim.pos.z;
|
||||||
|
@ -2732,7 +2732,7 @@ void CollisionCheck_OC_JntSphVsJntSph(PlayState* play, CollisionCheckContext* co
|
||||||
ColliderJntSphElement* leftElem;
|
ColliderJntSphElement* leftElem;
|
||||||
ColliderJntSph* right = (ColliderJntSph*)r;
|
ColliderJntSph* right = (ColliderJntSph*)r;
|
||||||
ColliderJntSphElement* rightElem;
|
ColliderJntSphElement* rightElem;
|
||||||
f32 overlap;
|
f32 overlapSize;
|
||||||
|
|
||||||
if (left->count > 0 && left->elements != NULL && right->count > 0 && right->elements != NULL) {
|
if (left->count > 0 && left->elements != NULL && right->count > 0 && right->elements != NULL) {
|
||||||
for (leftElem = left->elements; leftElem < left->elements + left->count; leftElem++) {
|
for (leftElem = left->elements; leftElem < left->elements + left->count; leftElem++) {
|
||||||
|
@ -2743,14 +2743,15 @@ void CollisionCheck_OC_JntSphVsJntSph(PlayState* play, CollisionCheckContext* co
|
||||||
if (!(rightElem->info.ocElemFlags & OCELEM_ON)) {
|
if (!(rightElem->info.ocElemFlags & OCELEM_ON)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (Math3D_SphVsSphOverlap(&leftElem->dim.worldSphere, &rightElem->dim.worldSphere, &overlap) == true) {
|
if (Math3D_SphVsSphOverlap(&leftElem->dim.worldSphere, &rightElem->dim.worldSphere, &overlapSize) ==
|
||||||
|
true) {
|
||||||
Vec3f leftPos;
|
Vec3f leftPos;
|
||||||
Vec3f rightPos;
|
Vec3f rightPos;
|
||||||
|
|
||||||
Math_Vec3s_ToVec3f(&leftPos, &leftElem->dim.worldSphere.center);
|
Math_Vec3s_ToVec3f(&leftPos, &leftElem->dim.worldSphere.center);
|
||||||
Math_Vec3s_ToVec3f(&rightPos, &rightElem->dim.worldSphere.center);
|
Math_Vec3s_ToVec3f(&rightPos, &rightElem->dim.worldSphere.center);
|
||||||
CollisionCheck_SetOCvsOC(&left->base, &leftElem->info, &leftPos, &right->base, &rightElem->info,
|
CollisionCheck_SetOCvsOC(&left->base, &leftElem->info, &leftPos, &right->base, &rightElem->info,
|
||||||
&rightPos, overlap);
|
&rightPos, overlapSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2764,7 +2765,7 @@ void CollisionCheck_OC_JntSphVsCyl(PlayState* play, CollisionCheckContext* colCh
|
||||||
ColliderJntSph* left = (ColliderJntSph*)l;
|
ColliderJntSph* left = (ColliderJntSph*)l;
|
||||||
ColliderJntSphElement* leftElem;
|
ColliderJntSphElement* leftElem;
|
||||||
ColliderCylinder* right = (ColliderCylinder*)r;
|
ColliderCylinder* right = (ColliderCylinder*)r;
|
||||||
f32 overlap;
|
f32 overlapSize;
|
||||||
|
|
||||||
if (left->count > 0 && left->elements != NULL) {
|
if (left->count > 0 && left->elements != NULL) {
|
||||||
if ((right->base.ocFlags1 & OC1_ON) && (right->info.ocElemFlags & OCELEM_ON)) {
|
if ((right->base.ocFlags1 & OC1_ON) && (right->info.ocElemFlags & OCELEM_ON)) {
|
||||||
|
@ -2772,14 +2773,14 @@ void CollisionCheck_OC_JntSphVsCyl(PlayState* play, CollisionCheckContext* colCh
|
||||||
if (!(leftElem->info.ocElemFlags & OCELEM_ON)) {
|
if (!(leftElem->info.ocElemFlags & OCELEM_ON)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (Math3D_SphVsCylOverlapDist(&leftElem->dim.worldSphere, &right->dim, &overlap) == true) {
|
if (Math3D_SphVsCylOverlap(&leftElem->dim.worldSphere, &right->dim, &overlapSize) == true) {
|
||||||
Vec3f leftPos;
|
Vec3f leftPos;
|
||||||
Vec3f rightPos;
|
Vec3f rightPos;
|
||||||
|
|
||||||
Math_Vec3s_ToVec3f(&leftPos, &leftElem->dim.worldSphere.center);
|
Math_Vec3s_ToVec3f(&leftPos, &leftElem->dim.worldSphere.center);
|
||||||
Math_Vec3s_ToVec3f(&rightPos, &right->dim.pos);
|
Math_Vec3s_ToVec3f(&rightPos, &right->dim.pos);
|
||||||
CollisionCheck_SetOCvsOC(&left->base, &leftElem->info, &leftPos, &right->base, &right->info,
|
CollisionCheck_SetOCvsOC(&left->base, &leftElem->info, &leftPos, &right->base, &right->info,
|
||||||
&rightPos, overlap);
|
&rightPos, overlapSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2799,18 +2800,18 @@ void CollisionCheck_OC_CylVsJntSph(PlayState* play, CollisionCheckContext* colCh
|
||||||
void CollisionCheck_OC_CylVsCyl(PlayState* play, CollisionCheckContext* colChkCtx, Collider* l, Collider* r) {
|
void CollisionCheck_OC_CylVsCyl(PlayState* play, CollisionCheckContext* colChkCtx, Collider* l, Collider* r) {
|
||||||
ColliderCylinder* left = (ColliderCylinder*)l;
|
ColliderCylinder* left = (ColliderCylinder*)l;
|
||||||
ColliderCylinder* right = (ColliderCylinder*)r;
|
ColliderCylinder* right = (ColliderCylinder*)r;
|
||||||
f32 deadSpace;
|
f32 overlapSize;
|
||||||
|
|
||||||
if ((left->base.ocFlags1 & OC1_ON) && (right->base.ocFlags1 & OC1_ON)) {
|
if ((left->base.ocFlags1 & OC1_ON) && (right->base.ocFlags1 & OC1_ON)) {
|
||||||
if ((left->info.ocElemFlags & OCELEM_ON) && (right->info.ocElemFlags & OCELEM_ON)) {
|
if ((left->info.ocElemFlags & OCELEM_ON) && (right->info.ocElemFlags & OCELEM_ON)) {
|
||||||
if (Math3D_CylOutsideCyl(&left->dim, &right->dim, &deadSpace) == true) {
|
if (Math3D_CylVsCylOverlap(&left->dim, &right->dim, &overlapSize) == true) {
|
||||||
Vec3f leftPos;
|
Vec3f leftPos;
|
||||||
Vec3f rightPos;
|
Vec3f rightPos;
|
||||||
|
|
||||||
Math_Vec3s_ToVec3f(&leftPos, &left->dim.pos);
|
Math_Vec3s_ToVec3f(&leftPos, &left->dim.pos);
|
||||||
Math_Vec3s_ToVec3f(&rightPos, &right->dim.pos);
|
Math_Vec3s_ToVec3f(&rightPos, &right->dim.pos);
|
||||||
CollisionCheck_SetOCvsOC(&left->base, &left->info, &leftPos, &right->base, &right->info, &rightPos,
|
CollisionCheck_SetOCvsOC(&left->base, &left->info, &leftPos, &right->base, &right->info, &rightPos,
|
||||||
deadSpace);
|
overlapSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3226,8 +3227,6 @@ void Collider_SetTrisDim(PlayState* play, ColliderTris* collider, s32 index, Col
|
||||||
// by the compiler between structs like TriNorm and/or Vec3f, so they don't take space in bss.
|
// by the compiler between structs like TriNorm and/or Vec3f, so they don't take space in bss.
|
||||||
static s8 sBssDummy11;
|
static s8 sBssDummy11;
|
||||||
static s8 sBssDummy12;
|
static s8 sBssDummy12;
|
||||||
static s8 sBssDummy13;
|
|
||||||
static s8 sBssDummy14;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the world spheres for all of the collider's JntSph elements attached to the specified limb
|
* Updates the world spheres for all of the collider's JntSph elements attached to the specified limb
|
||||||
|
|
|
@ -21,15 +21,15 @@ void EnAObj_SetupBoulderFragment(EnAObj* this, s16 type);
|
||||||
void EnAObj_SetupBlock(EnAObj* this, s16 type);
|
void EnAObj_SetupBlock(EnAObj* this, s16 type);
|
||||||
|
|
||||||
ActorInit En_A_Obj_InitVars = {
|
ActorInit En_A_Obj_InitVars = {
|
||||||
ACTOR_EN_A_OBJ,
|
/**/ ACTOR_EN_A_OBJ,
|
||||||
ACTORCAT_PROP,
|
/**/ ACTORCAT_PROP,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_GAMEPLAY_KEEP,
|
/**/ OBJECT_GAMEPLAY_KEEP,
|
||||||
sizeof(EnAObj),
|
/**/ sizeof(EnAObj),
|
||||||
(ActorFunc)EnAObj_Init,
|
/**/ EnAObj_Init,
|
||||||
(ActorFunc)EnAObj_Destroy,
|
/**/ EnAObj_Destroy,
|
||||||
(ActorFunc)EnAObj_Update,
|
/**/ EnAObj_Update,
|
||||||
(ActorFunc)EnAObj_Draw,
|
/**/ EnAObj_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColliderCylinderInit sCylinderInit = {
|
static ColliderCylinderInit sCylinderInit = {
|
||||||
|
|
|
@ -21,15 +21,15 @@ void EnItem00_DrawHeartContainer(EnItem00* this, PlayState* play);
|
||||||
void EnItem00_DrawHeartPiece(EnItem00* this, PlayState* play);
|
void EnItem00_DrawHeartPiece(EnItem00* this, PlayState* play);
|
||||||
|
|
||||||
ActorInit En_Item00_InitVars = {
|
ActorInit En_Item00_InitVars = {
|
||||||
ACTOR_EN_ITEM00,
|
/**/ ACTOR_EN_ITEM00,
|
||||||
ACTORCAT_MISC,
|
/**/ ACTORCAT_MISC,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_GAMEPLAY_KEEP,
|
/**/ OBJECT_GAMEPLAY_KEEP,
|
||||||
sizeof(EnItem00),
|
/**/ sizeof(EnItem00),
|
||||||
(ActorFunc)EnItem00_Init,
|
/**/ EnItem00_Init,
|
||||||
(ActorFunc)EnItem00_Destroy,
|
/**/ EnItem00_Destroy,
|
||||||
(ActorFunc)EnItem00_Update,
|
/**/ EnItem00_Update,
|
||||||
(ActorFunc)EnItem00_Draw,
|
/**/ EnItem00_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColliderCylinderInit sCylinderInit = {
|
static ColliderCylinderInit sCylinderInit = {
|
||||||
|
|
|
@ -37,7 +37,7 @@ void Font_LoadOrderedFont(Font* font) {
|
||||||
s32 jj;
|
s32 jj;
|
||||||
s32 codePointIndex;
|
s32 codePointIndex;
|
||||||
s32 fontBufIndex;
|
s32 fontBufIndex;
|
||||||
size_t offset;
|
u32 offset;
|
||||||
|
|
||||||
font->msgOffset = _message_0xFFFC_nes - (const char*)_nes_message_data_staticSegmentStart;
|
font->msgOffset = _message_0xFFFC_nes - (const char*)_nes_message_data_staticSegmentStart;
|
||||||
len = font->msgLength = _message_0xFFFD_nes - _message_0xFFFC_nes;
|
len = font->msgLength = _message_0xFFFD_nes - _message_0xFFFC_nes;
|
||||||
|
|
|
@ -278,7 +278,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
case 2290: {
|
case 2290: {
|
||||||
Actor* rideActor = player->rideActor;
|
Actor* rideActor = player->rideActor;
|
||||||
|
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
if (rideActor != NULL) {
|
if (rideActor != NULL) {
|
||||||
rideActor->freezeTimer = 180;
|
rideActor->freezeTimer = 180;
|
||||||
}
|
}
|
||||||
|
@ -290,7 +290,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case 5120:
|
case 5120:
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
|
|
||||||
csInfo->keyFrames = D_80121314;
|
csInfo->keyFrames = D_80121314;
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_80121314);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_80121314);
|
||||||
|
@ -301,7 +301,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
case 4510:
|
case 4510:
|
||||||
D_8012133C[0].eyeTargetInit = actor->world.pos;
|
D_8012133C[0].eyeTargetInit = actor->world.pos;
|
||||||
D_8012133C[0].eyeTargetInit.y = player->actor.world.pos.y + 40.0f;
|
D_8012133C[0].eyeTargetInit.y = player->actor.world.pos.y + 40.0f;
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
|
|
||||||
csInfo->keyFrames = D_8012133C;
|
csInfo->keyFrames = D_8012133C;
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_8012133C);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_8012133C);
|
||||||
|
@ -320,7 +320,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
OnePointCutscene_AddVecGeoToVec3f(&spB4, &spC0, &spD0);
|
OnePointCutscene_AddVecGeoToVec3f(&spB4, &spC0, &spD0);
|
||||||
Play_ChangeCameraSetting(play, subCamId, CAM_SET_FREE2);
|
Play_ChangeCameraSetting(play, subCamId, CAM_SET_FREE2);
|
||||||
Play_SetCameraAtEye(play, subCamId, &spC0, &spB4);
|
Play_SetCameraAtEye(play, subCamId, &spC0, &spB4);
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
subCam->roll = 0;
|
subCam->roll = 0;
|
||||||
subCam->fov = 50.0f;
|
subCam->fov = 50.0f;
|
||||||
if (subCam->childCamId != CAM_ID_MAIN) {
|
if (subCam->childCamId != CAM_ID_MAIN) {
|
||||||
|
@ -335,7 +335,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
if (Rand_ZeroOne() < 0.0f) {
|
if (Rand_ZeroOne() < 0.0f) {
|
||||||
D_801213B4[3].eyeTargetInit.x = -D_801213B4[3].eyeTargetInit.x;
|
D_801213B4[3].eyeTargetInit.x = -D_801213B4[3].eyeTargetInit.x;
|
||||||
}
|
}
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
|
|
||||||
csInfo->keyFrames = D_801213B4;
|
csInfo->keyFrames = D_801213B4;
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_801213B4);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_801213B4);
|
||||||
|
@ -382,11 +382,11 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
Play_SetCameraAtEye(play, subCamId, &spC0, &spB4);
|
Play_SetCameraAtEye(play, subCamId, &spC0, &spB4);
|
||||||
subCam->roll = 6;
|
subCam->roll = 6;
|
||||||
subCam->fov = 75.0f;
|
subCam->fov = 75.0f;
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3040:
|
case 3040:
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
D_8012151C[0].timerInit = timer - 1;
|
D_8012151C[0].timerInit = timer - 1;
|
||||||
|
|
||||||
csInfo->keyFrames = D_8012151C;
|
csInfo->keyFrames = D_8012151C;
|
||||||
|
@ -411,7 +411,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_8012156C);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_8012156C);
|
||||||
|
|
||||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3010:
|
case 3010:
|
||||||
|
@ -443,7 +443,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3090:
|
case 3090:
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
|
|
||||||
csInfo->keyFrames = D_80121814;
|
csInfo->keyFrames = D_80121814;
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_80121814);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_80121814);
|
||||||
|
@ -460,7 +460,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
Play_SetCameraAtEye(play, subCamId, &spC0, &spB4);
|
Play_SetCameraAtEye(play, subCamId, &spC0, &spB4);
|
||||||
subCam->roll = 0;
|
subCam->roll = 0;
|
||||||
subCam->fov = 70.0f;
|
subCam->fov = 70.0f;
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3380:
|
case 3380:
|
||||||
|
@ -468,7 +468,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
csInfo->keyFrames = D_801218B4;
|
csInfo->keyFrames = D_801218B4;
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_801218B4);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_801218B4);
|
||||||
|
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||||
|
|
||||||
i = Quake_Request(subCam, QUAKE_TYPE_1);
|
i = Quake_Request(subCam, QUAKE_TYPE_1);
|
||||||
|
@ -481,13 +481,13 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
csInfo->keyFrames = D_80121904;
|
csInfo->keyFrames = D_80121904;
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_80121904);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_80121904);
|
||||||
|
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3050:
|
case 3050:
|
||||||
Play_ChangeCameraSetting(play, subCamId, CAM_SET_CS_3);
|
Play_ChangeCameraSetting(play, subCamId, CAM_SET_CS_3);
|
||||||
func_8002DF54(play, &player->actor, PLAYER_CSMODE_5);
|
Player_SetCsActionWithHaltedActors(play, &player->actor, PLAYER_CSACTION_5);
|
||||||
OnePointCutscene_SetCsCamPoints(subCam, D_80120304 | 0x2000, D_80120300, D_8012013C, D_8012021C);
|
OnePointCutscene_SetCsCamPoints(subCam, D_80120304 | 0x2000, D_80120300, D_8012013C, D_8012021C);
|
||||||
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
|
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
|
||||||
OnePointCutscene_Vec3sToVec3f(&mainCam->at, &D_8012013C[D_801202FC - 2].pos);
|
OnePointCutscene_Vec3sToVec3f(&mainCam->at, &D_8012013C[D_801202FC - 2].pos);
|
||||||
|
@ -517,7 +517,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
subCam->stateFlags |= CAM_STATE_1;
|
subCam->stateFlags |= CAM_STATE_1;
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_80121954[0]);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_80121954[0]);
|
||||||
|
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -525,7 +525,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
csInfo->keyFrames = D_80121A44;
|
csInfo->keyFrames = D_80121A44;
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_80121A44);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_80121A44);
|
||||||
|
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||||
subCam->stateFlags |= CAM_STATE_1;
|
subCam->stateFlags |= CAM_STATE_1;
|
||||||
break;
|
break;
|
||||||
|
@ -552,7 +552,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
Play_SetCameraAtEye(play, subCamId, &spC0, &spB4);
|
Play_SetCameraAtEye(play, subCamId, &spC0, &spB4);
|
||||||
subCam->roll = 0x50;
|
subCam->roll = 0x50;
|
||||||
subCam->fov = 55.0f;
|
subCam->fov = 55.0f;
|
||||||
func_8002DF38(play, &player->actor, PLAYER_CSMODE_8);
|
Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_8);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3170:
|
case 3170:
|
||||||
|
@ -569,7 +569,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
Play_CopyCamera(play, CAM_ID_MAIN, subCamId);
|
Play_CopyCamera(play, CAM_ID_MAIN, subCamId);
|
||||||
subCam->roll = -1;
|
subCam->roll = -1;
|
||||||
subCam->fov = 55.0f;
|
subCam->fov = 55.0f;
|
||||||
func_8002DF38(play, actor, PLAYER_CSMODE_1);
|
Player_SetCsAction(play, actor, PLAYER_CSACTION_1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3160:
|
case 3160:
|
||||||
|
@ -583,7 +583,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
Play_SetCameraAtEye(play, subCamId, &spC0, &spB4);
|
Play_SetCameraAtEye(play, subCamId, &spC0, &spB4);
|
||||||
subCam->roll = 0;
|
subCam->roll = 0;
|
||||||
subCam->fov = 55.0f;
|
subCam->fov = 55.0f;
|
||||||
func_8002DF38(play, &player->actor, PLAYER_CSMODE_8);
|
Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_8);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3180:
|
case 3180:
|
||||||
|
@ -598,13 +598,13 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
Play_SetCameraAtEye(play, subCamId, &spC0, &spB4);
|
Play_SetCameraAtEye(play, subCamId, &spC0, &spB4);
|
||||||
subCam->roll = 0;
|
subCam->roll = 0;
|
||||||
subCam->fov = 60.0f;
|
subCam->fov = 60.0f;
|
||||||
func_8002DF38(play, actor, PLAYER_CSMODE_1);
|
Player_SetCsAction(play, actor, PLAYER_CSACTION_1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3190:
|
case 3190:
|
||||||
Play_ChangeCameraSetting(play, subCamId, CAM_SET_FOREST_DEFEAT_POE);
|
Play_ChangeCameraSetting(play, subCamId, CAM_SET_FOREST_DEFEAT_POE);
|
||||||
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
||||||
func_8002DF38(play, actor, PLAYER_CSMODE_12);
|
Player_SetCsAction(play, actor, PLAYER_CSACTION_12);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3230:
|
case 3230:
|
||||||
|
@ -618,7 +618,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
Play_SetCameraAtEye(play, subCamId, &spC0, &spB4);
|
Play_SetCameraAtEye(play, subCamId, &spC0, &spB4);
|
||||||
subCam->roll = 0x1E;
|
subCam->roll = 0x1E;
|
||||||
subCam->fov = 75.0f;
|
subCam->fov = 75.0f;
|
||||||
func_8002DF38(play, &player->actor, PLAYER_CSMODE_8);
|
Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_8);
|
||||||
Actor_GetWorldPosShapeRot(&spA0, actor);
|
Actor_GetWorldPosShapeRot(&spA0, actor);
|
||||||
Actor_GetFocus(&sp8C, &player->actor);
|
Actor_GetFocus(&sp8C, &player->actor);
|
||||||
spC0.x = sp8C.pos.x;
|
spC0.x = sp8C.pos.x;
|
||||||
|
@ -648,7 +648,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
Play_SetCameraAtEye(play, subCamId, &spC0, &spB4);
|
Play_SetCameraAtEye(play, subCamId, &spC0, &spB4);
|
||||||
subCam->roll = 0;
|
subCam->roll = 0;
|
||||||
subCam->fov = 45.0f;
|
subCam->fov = 45.0f;
|
||||||
func_8002DF38(play, &player->actor, PLAYER_CSMODE_8);
|
Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_8);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3220:
|
case 3220:
|
||||||
|
@ -665,7 +665,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
subCam->roll = 0;
|
subCam->roll = 0;
|
||||||
subCam->fov = 75.0f;
|
subCam->fov = 75.0f;
|
||||||
player->actor.shape.rot.y = player->actor.world.rot.y = player->yaw = spD0.yaw + 0x7FFF;
|
player->actor.shape.rot.y = player->actor.world.rot.y = player->yaw = spD0.yaw + 0x7FFF;
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3240:
|
case 3240:
|
||||||
|
@ -674,13 +674,13 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
csInfo->keyFrames = D_80121D3C;
|
csInfo->keyFrames = D_80121D3C;
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_80121D3C);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_80121D3C);
|
||||||
|
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6001:
|
case 6001:
|
||||||
Play_ChangeCameraSetting(play, subCamId, CAM_SET_CS_3);
|
Play_ChangeCameraSetting(play, subCamId, CAM_SET_CS_3);
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
Actor_GetWorld(&spA0, actor);
|
Actor_GetWorld(&spA0, actor);
|
||||||
if (spA0.pos.z > -750.0f) {
|
if (spA0.pos.z > -750.0f) {
|
||||||
OnePointCutscene_SetCsCamPoints(subCam, D_801208E8, D_801208E4, D_801206A0, D_80120820);
|
OnePointCutscene_SetCsCamPoints(subCam, D_801208E8, D_801208E4, D_801206A0, D_80120820);
|
||||||
|
@ -696,7 +696,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
|
|
||||||
case 3400:
|
case 3400:
|
||||||
Play_ChangeCameraSetting(play, subCamId, CAM_SET_CS_3);
|
Play_ChangeCameraSetting(play, subCamId, CAM_SET_CS_3);
|
||||||
func_8002DF38(play, &player->actor, PLAYER_CSMODE_8);
|
Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_8);
|
||||||
OnePointCutscene_SetCsCamPoints(subCam, D_8012069C | 0x2000, D_80120698, D_801204D4, D_801205B4);
|
OnePointCutscene_SetCsCamPoints(subCam, D_8012069C | 0x2000, D_80120698, D_801204D4, D_801205B4);
|
||||||
OnePointCutscene_Vec3sToVec3f(&mainCam->eye, &D_801205B4[D_80120694 - 2].pos);
|
OnePointCutscene_Vec3sToVec3f(&mainCam->eye, &D_801205B4[D_80120694 - 2].pos);
|
||||||
OnePointCutscene_Vec3sToVec3f(&mainCam->at, &D_801204D4[D_80120694 - 2].pos);
|
OnePointCutscene_Vec3sToVec3f(&mainCam->at, &D_801204D4[D_80120694 - 2].pos);
|
||||||
|
@ -713,13 +713,13 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
csInfo->keyFrames = D_80121DB4;
|
csInfo->keyFrames = D_80121DB4;
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_80121DB4);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_80121DB4);
|
||||||
|
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3310:
|
case 3310:
|
||||||
Play_ChangeCameraSetting(play, subCamId, CAM_SET_FIRE_STAIRCASE);
|
Play_ChangeCameraSetting(play, subCamId, CAM_SET_FIRE_STAIRCASE);
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
Play_CopyCamera(play, subCamId, CAM_ID_MAIN);
|
Play_CopyCamera(play, subCamId, CAM_ID_MAIN);
|
||||||
|
|
||||||
i = Quake_Request(subCam, QUAKE_TYPE_1);
|
i = Quake_Request(subCam, QUAKE_TYPE_1);
|
||||||
|
@ -754,7 +754,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
csInfo->keyFrames = D_80121FBC;
|
csInfo->keyFrames = D_80121FBC;
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_80121FBC);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_80121FBC);
|
||||||
|
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||||
|
|
||||||
i = Quake_Request(subCam, QUAKE_TYPE_3);
|
i = Quake_Request(subCam, QUAKE_TYPE_3);
|
||||||
|
@ -767,7 +767,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
csInfo->keyFrames = D_8012205C;
|
csInfo->keyFrames = D_8012205C;
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_8012205C);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_8012205C);
|
||||||
|
|
||||||
func_8002DF38(play, &player->actor, PLAYER_CSMODE_8);
|
Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_8);
|
||||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -783,7 +783,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
D_801220D4[1].eyeTargetInit.y = 80.0f;
|
D_801220D4[1].eyeTargetInit.y = 80.0f;
|
||||||
D_801220D4[1].eyeTargetInit.x = -D_801220D4[1].eyeTargetInit.x;
|
D_801220D4[1].eyeTargetInit.x = -D_801220D4[1].eyeTargetInit.x;
|
||||||
}
|
}
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
|
|
||||||
csInfo->keyFrames = D_801220D4;
|
csInfo->keyFrames = D_801220D4;
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_801220D4);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_801220D4);
|
||||||
|
@ -795,7 +795,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
csInfo->keyFrames = D_8012219C;
|
csInfo->keyFrames = D_8012219C;
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_8012219C);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_8012219C);
|
||||||
|
|
||||||
func_8002DF38(play, &player->actor, PLAYER_CSMODE_8);
|
Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_8);
|
||||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -803,7 +803,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
csInfo->keyFrames = D_801222B4;
|
csInfo->keyFrames = D_801222B4;
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_801222B4);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_801222B4);
|
||||||
|
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||||
|
|
||||||
i = Quake_Request(subCam, QUAKE_TYPE_1);
|
i = Quake_Request(subCam, QUAKE_TYPE_1);
|
||||||
|
@ -816,7 +816,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
csInfo->keyFrames = D_8012237C;
|
csInfo->keyFrames = D_8012237C;
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_8012237C);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_8012237C);
|
||||||
|
|
||||||
func_8002DF38(play, &player->actor, PLAYER_CSMODE_8);
|
Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_8);
|
||||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||||
|
|
||||||
i = Quake_Request(subCam, QUAKE_TYPE_1);
|
i = Quake_Request(subCam, QUAKE_TYPE_1);
|
||||||
|
@ -829,7 +829,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
csInfo->keyFrames = D_801223CC;
|
csInfo->keyFrames = D_801223CC;
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_801223CC);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_801223CC);
|
||||||
|
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||||
player->stateFlags1 |= PLAYER_STATE1_29;
|
player->stateFlags1 |= PLAYER_STATE1_29;
|
||||||
player->actor.freezeTimer = 90;
|
player->actor.freezeTimer = 90;
|
||||||
|
@ -844,7 +844,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
csInfo->keyFrames = D_801224BC;
|
csInfo->keyFrames = D_801224BC;
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_801224BC);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_801224BC);
|
||||||
|
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||||
|
|
||||||
i = Quake_Request(subCam, QUAKE_TYPE_1);
|
i = Quake_Request(subCam, QUAKE_TYPE_1);
|
||||||
|
@ -859,19 +859,19 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
|
|
||||||
player->actor.shape.rot.y = player->actor.world.rot.y = player->yaw = 0x3FFC;
|
player->actor.shape.rot.y = player->actor.world.rot.y = player->yaw = 0x3FFC;
|
||||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4110:
|
case 4110:
|
||||||
csInfo->keyFrames = D_8012269C;
|
csInfo->keyFrames = D_8012269C;
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_8012269C);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_8012269C);
|
||||||
|
|
||||||
func_8002DF38(play, &player->actor, PLAYER_CSMODE_8);
|
Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_8);
|
||||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4120:
|
case 4120:
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
D_80122714[1].timerInit = 80;
|
D_80122714[1].timerInit = 80;
|
||||||
csInfo->keyFrames = D_80122714;
|
csInfo->keyFrames = D_80122714;
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_80122714);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_80122714);
|
||||||
|
@ -891,7 +891,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
csInfo->keyFrames = D_801228A4;
|
csInfo->keyFrames = D_801228A4;
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_801228A4);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_801228A4);
|
||||||
|
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
||||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||||
break;
|
break;
|
||||||
|
@ -900,7 +900,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
csInfo->keyFrames = D_8012296C;
|
csInfo->keyFrames = D_8012296C;
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_8012296C);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_8012296C);
|
||||||
|
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
||||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||||
break;
|
break;
|
||||||
|
@ -909,7 +909,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
csInfo->keyFrames = D_80122A0C;
|
csInfo->keyFrames = D_80122A0C;
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_80122A0C);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_80122A0C);
|
||||||
|
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
||||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||||
break;
|
break;
|
||||||
|
@ -918,7 +918,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
csInfo->keyFrames = D_80122A5C;
|
csInfo->keyFrames = D_80122A5C;
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_80122A5C);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_80122A5C);
|
||||||
|
|
||||||
func_8002DF38(play, &player->actor, PLAYER_CSMODE_8);
|
Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_8);
|
||||||
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
||||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||||
break;
|
break;
|
||||||
|
@ -927,7 +927,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
csInfo->keyFrames = D_80122B9C;
|
csInfo->keyFrames = D_80122B9C;
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_80122B9C);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_80122B9C);
|
||||||
|
|
||||||
func_8002DF38(play, &player->actor, PLAYER_CSMODE_8);
|
Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_8);
|
||||||
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
||||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||||
break;
|
break;
|
||||||
|
@ -951,7 +951,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_80122C3C);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_80122C3C);
|
||||||
|
|
||||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||||
func_8002DF38(play, &player->actor, PLAYER_CSMODE_1);
|
Player_SetCsAction(play, &player->actor, PLAYER_CSACTION_1);
|
||||||
|
|
||||||
i = Quake_Request(subCam, QUAKE_TYPE_3);
|
i = Quake_Request(subCam, QUAKE_TYPE_3);
|
||||||
Quake_SetSpeed(i, 12000);
|
Quake_SetSpeed(i, 12000);
|
||||||
|
@ -963,12 +963,12 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
csInfo->keyFrames = D_80122C8C;
|
csInfo->keyFrames = D_80122C8C;
|
||||||
csInfo->keyFrameCount = ARRAY_COUNT(D_80122C8C);
|
csInfo->keyFrameCount = ARRAY_COUNT(D_80122C8C);
|
||||||
|
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3260:
|
case 3260:
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
D_80122CB4[1].timerInit = timer - 5;
|
D_80122CB4[1].timerInit = timer - 5;
|
||||||
|
|
||||||
csInfo->keyFrames = D_80122CB4;
|
csInfo->keyFrames = D_80122CB4;
|
||||||
|
@ -978,7 +978,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3261:
|
case 3261:
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
D_80122D04[1].timerInit = timer - 10;
|
D_80122D04[1].timerInit = timer - 10;
|
||||||
|
|
||||||
csInfo->keyFrames = D_80122D04;
|
csInfo->keyFrames = D_80122D04;
|
||||||
|
|
|
@ -121,7 +121,7 @@ static s16 D_801208E8 = 8;
|
||||||
static OnePointCsFull D_801208EC[3] = {
|
static OnePointCsFull D_801208EC[3] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8),
|
||||||
0x0101,
|
0x0101,
|
||||||
1,
|
1,
|
||||||
0,
|
0,
|
||||||
|
@ -182,7 +182,7 @@ static OnePointCsFull D_80120964[2] = {
|
||||||
static OnePointCsFull D_801209B4[4] = {
|
static OnePointCsFull D_801209B4[4] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8),
|
||||||
0x0101,
|
0x0101,
|
||||||
1,
|
1,
|
||||||
0,
|
0,
|
||||||
|
@ -193,7 +193,7 @@ static OnePointCsFull D_801209B4[4] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, true),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, true),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x0100,
|
0x0100,
|
||||||
29,
|
29,
|
||||||
0,
|
0,
|
||||||
|
@ -287,7 +287,7 @@ static OnePointCsFull D_80120ACC[5] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x0442,
|
0x0442,
|
||||||
10,
|
10,
|
||||||
0,
|
0,
|
||||||
|
@ -323,7 +323,7 @@ static OnePointCsFull D_80120ACC[5] = {
|
||||||
static OnePointCsFull D_80120B94[11] = {
|
static OnePointCsFull D_80120B94[11] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x2142,
|
0x2142,
|
||||||
1,
|
1,
|
||||||
0,
|
0,
|
||||||
|
@ -447,7 +447,7 @@ static OnePointCsFull D_80120B94[11] = {
|
||||||
static OnePointCsFull D_80120D4C[7] = {
|
static OnePointCsFull D_80120D4C[7] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x2142,
|
0x2142,
|
||||||
1,
|
1,
|
||||||
0,
|
0,
|
||||||
|
@ -527,7 +527,7 @@ static OnePointCsFull D_80120D4C[7] = {
|
||||||
static OnePointCsFull D_80120E64[8] = {
|
static OnePointCsFull D_80120E64[8] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, true, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, true, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x2142,
|
0x2142,
|
||||||
20,
|
20,
|
||||||
0,
|
0,
|
||||||
|
@ -618,7 +618,7 @@ static OnePointCsFull D_80120E64[8] = {
|
||||||
static OnePointCsFull D_80120FA4[6] = {
|
static OnePointCsFull D_80120FA4[6] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x2143,
|
0x2143,
|
||||||
30,
|
30,
|
||||||
0,
|
0,
|
||||||
|
@ -687,7 +687,7 @@ static OnePointCsFull D_80120FA4[6] = {
|
||||||
static OnePointCsFull D_80121094[3] = {
|
static OnePointCsFull D_80121094[3] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8),
|
||||||
0x2101,
|
0x2101,
|
||||||
20,
|
20,
|
||||||
0,
|
0,
|
||||||
|
@ -698,7 +698,7 @@ static OnePointCsFull D_80121094[3] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x2101,
|
0x2101,
|
||||||
50,
|
50,
|
||||||
0,
|
0,
|
||||||
|
@ -723,7 +723,7 @@ static OnePointCsFull D_80121094[3] = {
|
||||||
static OnePointCsFull D_8012110C[3] = {
|
static OnePointCsFull D_8012110C[3] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_5),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_5),
|
||||||
0x2142,
|
0x2142,
|
||||||
1,
|
1,
|
||||||
0,
|
0,
|
||||||
|
@ -759,7 +759,7 @@ static OnePointCsFull D_8012110C[3] = {
|
||||||
static OnePointCsFull D_80121184[2] = {
|
static OnePointCsFull D_80121184[2] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, true),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, true),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x0101,
|
0x0101,
|
||||||
40,
|
40,
|
||||||
0,
|
0,
|
||||||
|
@ -784,7 +784,7 @@ static OnePointCsFull D_80121184[2] = {
|
||||||
static OnePointCsFull D_801211D4[2] = {
|
static OnePointCsFull D_801211D4[2] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8),
|
||||||
0x0101,
|
0x0101,
|
||||||
50,
|
50,
|
||||||
0,
|
0,
|
||||||
|
@ -809,7 +809,7 @@ static OnePointCsFull D_801211D4[2] = {
|
||||||
static OnePointCsFull D_80121224[6] = {
|
static OnePointCsFull D_80121224[6] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x4141,
|
0x4141,
|
||||||
2,
|
2,
|
||||||
0,
|
0,
|
||||||
|
@ -831,7 +831,7 @@ static OnePointCsFull D_80121224[6] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, true),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, true),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_52),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_52),
|
||||||
0x4104,
|
0x4104,
|
||||||
80,
|
80,
|
||||||
0,
|
0,
|
||||||
|
@ -842,7 +842,7 @@ static OnePointCsFull D_80121224[6] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x0000,
|
0x0000,
|
||||||
20,
|
20,
|
||||||
0,
|
0,
|
||||||
|
@ -878,7 +878,7 @@ static OnePointCsFull D_80121224[6] = {
|
||||||
static OnePointCsFull D_80121314[1] = {
|
static OnePointCsFull D_80121314[1] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8),
|
||||||
0x4141,
|
0x4141,
|
||||||
1000,
|
1000,
|
||||||
0,
|
0,
|
||||||
|
@ -892,7 +892,7 @@ static OnePointCsFull D_80121314[1] = {
|
||||||
static OnePointCsFull D_8012133C[3] = {
|
static OnePointCsFull D_8012133C[3] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x0141,
|
0x0141,
|
||||||
40,
|
40,
|
||||||
0,
|
0,
|
||||||
|
@ -928,7 +928,7 @@ static OnePointCsFull D_8012133C[3] = {
|
||||||
static OnePointCsFull D_801213B4[5] = {
|
static OnePointCsFull D_801213B4[5] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8),
|
||||||
0xC2C2,
|
0xC2C2,
|
||||||
40,
|
40,
|
||||||
0,
|
0,
|
||||||
|
@ -939,7 +939,7 @@ static OnePointCsFull D_801213B4[5] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, false, true),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, false, true),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0xC2C2,
|
0xC2C2,
|
||||||
120,
|
120,
|
||||||
0,
|
0,
|
||||||
|
@ -950,7 +950,7 @@ static OnePointCsFull D_801213B4[5] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_83),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_83),
|
||||||
0xC2C2,
|
0xC2C2,
|
||||||
30,
|
30,
|
||||||
0,
|
0,
|
||||||
|
@ -961,7 +961,7 @@ static OnePointCsFull D_801213B4[5] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, true),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, true),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_69),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_69),
|
||||||
0x4222,
|
0x4222,
|
||||||
30,
|
30,
|
||||||
0,
|
0,
|
||||||
|
@ -986,7 +986,7 @@ static OnePointCsFull D_801213B4[5] = {
|
||||||
static OnePointCsFull D_8012147C[4] = {
|
static OnePointCsFull D_8012147C[4] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x0101,
|
0x0101,
|
||||||
40,
|
40,
|
||||||
0,
|
0,
|
||||||
|
@ -997,7 +997,7 @@ static OnePointCsFull D_8012147C[4] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x0142,
|
0x0142,
|
||||||
1,
|
1,
|
||||||
0,
|
0,
|
||||||
|
@ -1008,7 +1008,7 @@ static OnePointCsFull D_8012147C[4] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, true),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, true),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8),
|
||||||
0x0142,
|
0x0142,
|
||||||
89,
|
89,
|
||||||
-4,
|
-4,
|
||||||
|
@ -1033,7 +1033,7 @@ static OnePointCsFull D_8012147C[4] = {
|
||||||
static OnePointCsFull D_8012151C[2] = {
|
static OnePointCsFull D_8012151C[2] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x0101,
|
0x0101,
|
||||||
29,
|
29,
|
||||||
0,
|
0,
|
||||||
|
@ -1058,7 +1058,7 @@ static OnePointCsFull D_8012151C[2] = {
|
||||||
static OnePointCsFull D_8012156C[2] = {
|
static OnePointCsFull D_8012156C[2] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_77),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_77),
|
||||||
0x4242,
|
0x4242,
|
||||||
1,
|
1,
|
||||||
0,
|
0,
|
||||||
|
@ -1097,7 +1097,7 @@ static OnePointCsFull D_801215BC[1] = {
|
||||||
static OnePointCsFull D_801215E4[10] = {
|
static OnePointCsFull D_801215E4[10] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8),
|
||||||
0x4141,
|
0x4141,
|
||||||
20,
|
20,
|
||||||
0,
|
0,
|
||||||
|
@ -1108,7 +1108,7 @@ static OnePointCsFull D_801215E4[10] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x0101,
|
0x0101,
|
||||||
1,
|
1,
|
||||||
4,
|
4,
|
||||||
|
@ -1141,7 +1141,7 @@ static OnePointCsFull D_801215E4[10] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_9),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_9),
|
||||||
0x0101,
|
0x0101,
|
||||||
40,
|
40,
|
||||||
-5,
|
-5,
|
||||||
|
@ -1152,7 +1152,7 @@ static OnePointCsFull D_801215E4[10] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x0101,
|
0x0101,
|
||||||
1,
|
1,
|
||||||
0,
|
0,
|
||||||
|
@ -1210,7 +1210,7 @@ static OnePointCsFull D_801215E4[10] = {
|
||||||
static OnePointCsFull D_80121774[4] = {
|
static OnePointCsFull D_80121774[4] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8),
|
||||||
0x0101,
|
0x0101,
|
||||||
1,
|
1,
|
||||||
-2,
|
-2,
|
||||||
|
@ -1221,7 +1221,7 @@ static OnePointCsFull D_80121774[4] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x0142,
|
0x0142,
|
||||||
39,
|
39,
|
||||||
2,
|
2,
|
||||||
|
@ -1232,7 +1232,7 @@ static OnePointCsFull D_80121774[4] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_5),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_5),
|
||||||
0x0121,
|
0x0121,
|
||||||
20,
|
20,
|
||||||
0,
|
0,
|
||||||
|
@ -1257,7 +1257,7 @@ static OnePointCsFull D_80121774[4] = {
|
||||||
static OnePointCsFull D_80121814[4] = {
|
static OnePointCsFull D_80121814[4] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_76),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_76),
|
||||||
0x0101,
|
0x0101,
|
||||||
5,
|
5,
|
||||||
0,
|
0,
|
||||||
|
@ -1429,7 +1429,7 @@ static OnePointCsFull D_80121954[3][2] = {
|
||||||
static OnePointCsFull D_80121A44[12] = {
|
static OnePointCsFull D_80121A44[12] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_5),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_5),
|
||||||
0x2121,
|
0x2121,
|
||||||
10,
|
10,
|
||||||
0,
|
0,
|
||||||
|
@ -1440,7 +1440,7 @@ static OnePointCsFull D_80121A44[12] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, true, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, true, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x4242,
|
0x4242,
|
||||||
30,
|
30,
|
||||||
0,
|
0,
|
||||||
|
@ -1462,7 +1462,7 @@ static OnePointCsFull D_80121A44[12] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_5),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_5),
|
||||||
0x2222,
|
0x2222,
|
||||||
40,
|
40,
|
||||||
5,
|
5,
|
||||||
|
@ -1473,7 +1473,7 @@ static OnePointCsFull D_80121A44[12] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x4242,
|
0x4242,
|
||||||
40,
|
40,
|
||||||
5,
|
5,
|
||||||
|
@ -1517,7 +1517,7 @@ static OnePointCsFull D_80121A44[12] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x2242,
|
0x2242,
|
||||||
40,
|
40,
|
||||||
0,
|
0,
|
||||||
|
@ -1528,7 +1528,7 @@ static OnePointCsFull D_80121A44[12] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, true, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, true, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x22C2,
|
0x22C2,
|
||||||
140,
|
140,
|
||||||
0,
|
0,
|
||||||
|
@ -1564,7 +1564,7 @@ static OnePointCsFull D_80121A44[12] = {
|
||||||
static OnePointCsFull D_80121C24[7] = {
|
static OnePointCsFull D_80121C24[7] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_5),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_5),
|
||||||
0x0101,
|
0x0101,
|
||||||
1,
|
1,
|
||||||
0,
|
0,
|
||||||
|
@ -1586,7 +1586,7 @@ static OnePointCsFull D_80121C24[7] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8),
|
||||||
0x0101,
|
0x0101,
|
||||||
40,
|
40,
|
||||||
4,
|
4,
|
||||||
|
@ -1724,7 +1724,7 @@ static OnePointCsFull D_80121DB4[9] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_57),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_57),
|
||||||
0x2121,
|
0x2121,
|
||||||
1,
|
1,
|
||||||
8,
|
8,
|
||||||
|
@ -1746,7 +1746,7 @@ static OnePointCsFull D_80121DB4[9] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_9, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_9, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_56),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_56),
|
||||||
0x2121,
|
0x2121,
|
||||||
149,
|
149,
|
||||||
-20,
|
-20,
|
||||||
|
@ -1782,7 +1782,7 @@ static OnePointCsFull D_80121DB4[9] = {
|
||||||
static OnePointCsFull D_80121F1C[4] = {
|
static OnePointCsFull D_80121F1C[4] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8),
|
||||||
0x0101,
|
0x0101,
|
||||||
10,
|
10,
|
||||||
0,
|
0,
|
||||||
|
@ -1804,7 +1804,7 @@ static OnePointCsFull D_80121F1C[4] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_2),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_2),
|
||||||
0x2121,
|
0x2121,
|
||||||
23,
|
23,
|
||||||
0,
|
0,
|
||||||
|
@ -1898,7 +1898,7 @@ static OnePointCsFull D_8012205C[3] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x21A1,
|
0x21A1,
|
||||||
10,
|
10,
|
||||||
0,
|
0,
|
||||||
|
@ -1912,7 +1912,7 @@ static OnePointCsFull D_8012205C[3] = {
|
||||||
static OnePointCsFull D_801220D4[5] = {
|
static OnePointCsFull D_801220D4[5] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x0101,
|
0x0101,
|
||||||
5,
|
5,
|
||||||
0,
|
0,
|
||||||
|
@ -2282,7 +2282,7 @@ static OnePointCsFull D_801224BC[7] = {
|
||||||
static OnePointCsFull D_801225D4[5] = {
|
static OnePointCsFull D_801225D4[5] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8),
|
||||||
0x0101,
|
0x0101,
|
||||||
1,
|
1,
|
||||||
0,
|
0,
|
||||||
|
@ -2293,7 +2293,7 @@ static OnePointCsFull D_801225D4[5] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_59),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_59),
|
||||||
0x0101,
|
0x0101,
|
||||||
60,
|
60,
|
||||||
4,
|
4,
|
||||||
|
@ -2315,7 +2315,7 @@ static OnePointCsFull D_801225D4[5] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8),
|
||||||
0x2323,
|
0x2323,
|
||||||
2,
|
2,
|
||||||
0,
|
0,
|
||||||
|
@ -2492,7 +2492,7 @@ static OnePointCsFull D_801227B4[6] = {
|
||||||
static OnePointCsFull D_801228A4[5] = {
|
static OnePointCsFull D_801228A4[5] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x0101,
|
0x0101,
|
||||||
20,
|
20,
|
||||||
5,
|
5,
|
||||||
|
@ -2514,7 +2514,7 @@ static OnePointCsFull D_801228A4[5] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_8),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_8),
|
||||||
0x0101,
|
0x0101,
|
||||||
90,
|
90,
|
||||||
2,
|
2,
|
||||||
|
@ -2972,7 +2972,7 @@ static OnePointCsFull D_80122E44[2][7] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x4343,
|
0x4343,
|
||||||
160,
|
160,
|
||||||
10,
|
10,
|
||||||
|
@ -3051,7 +3051,7 @@ static OnePointCsFull D_80122E44[2][7] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x4343,
|
0x4343,
|
||||||
160,
|
160,
|
||||||
-10,
|
-10,
|
||||||
|
@ -3254,7 +3254,7 @@ static OnePointCsFull D_80123254[2] = {
|
||||||
static OnePointCsFull D_801232A4[1] = {
|
static OnePointCsFull D_801232A4[1] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_69),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_69),
|
||||||
0x0101,
|
0x0101,
|
||||||
9999,
|
9999,
|
||||||
0,
|
0,
|
||||||
|
@ -3384,7 +3384,7 @@ static OnePointCsFull D_80123394[5] = {
|
||||||
static OnePointCsFull D_8012345C[4] = {
|
static OnePointCsFull D_8012345C[4] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x4242,
|
0x4242,
|
||||||
40,
|
40,
|
||||||
0,
|
0,
|
||||||
|
@ -3395,7 +3395,7 @@ static OnePointCsFull D_8012345C[4] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_77),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_77),
|
||||||
0x4242,
|
0x4242,
|
||||||
40,
|
40,
|
||||||
0,
|
0,
|
||||||
|
@ -3406,7 +3406,7 @@ static OnePointCsFull D_8012345C[4] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x2121,
|
0x2121,
|
||||||
10,
|
10,
|
||||||
0,
|
0,
|
||||||
|
@ -3431,7 +3431,7 @@ static OnePointCsFull D_8012345C[4] = {
|
||||||
static OnePointCsFull D_801234FC[5] = {
|
static OnePointCsFull D_801234FC[5] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_5),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_5),
|
||||||
0x0441,
|
0x0441,
|
||||||
10,
|
10,
|
||||||
0,
|
0,
|
||||||
|
@ -3453,7 +3453,7 @@ static OnePointCsFull D_801234FC[5] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_16, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_16, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x0000,
|
0x0000,
|
||||||
1,
|
1,
|
||||||
0,
|
0,
|
||||||
|
@ -3489,7 +3489,7 @@ static OnePointCsFull D_801234FC[5] = {
|
||||||
static OnePointCsFull D_801235C4[5] = {
|
static OnePointCsFull D_801235C4[5] = {
|
||||||
{
|
{
|
||||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
||||||
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSMODE_1),
|
ONEPOINT_CS_INIT_FIELD_PLAYER_CS(PLAYER_CSACTION_1),
|
||||||
0x4141,
|
0x4141,
|
||||||
1,
|
1,
|
||||||
0,
|
0,
|
||||||
|
|
|
@ -3819,7 +3819,7 @@ void Interface_Draw(PlayState* play) {
|
||||||
gSaveContext.subTimerState = SUBTIMER_STATE_RESPAWN;
|
gSaveContext.subTimerState = SUBTIMER_STATE_RESPAWN;
|
||||||
gSaveContext.save.cutsceneIndex = 0;
|
gSaveContext.save.cutsceneIndex = 0;
|
||||||
Message_StartTextbox(play, 0x71B0, NULL);
|
Message_StartTextbox(play, 0x71B0, NULL);
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||||
} else {
|
} else {
|
||||||
sSubTimerStateTimer = 40;
|
sSubTimerStateTimer = 40;
|
||||||
gSaveContext.subTimerState = SUBTIMER_STATE_STOP;
|
gSaveContext.subTimerState = SUBTIMER_STATE_STOP;
|
||||||
|
|
|
@ -400,7 +400,8 @@ void Play_Init(GameState* thisx) {
|
||||||
zAllocAligned = (zAlloc + 8) & ~0xF;
|
zAllocAligned = (zAlloc + 8) & ~0xF;
|
||||||
ZeldaArena_Init((void*)zAllocAligned, zAllocSize - (zAllocAligned - zAlloc));
|
ZeldaArena_Init((void*)zAllocAligned, zAllocSize - (zAllocAligned - zAlloc));
|
||||||
// "Zelda Heap"
|
// "Zelda Heap"
|
||||||
osSyncPrintf("ゼルダヒープ %08x-%08x\n", zAllocAligned, zAllocAligned + zAllocSize - (s32)(zAllocAligned - zAlloc));
|
osSyncPrintf("ゼルダヒープ %08x-%08x\n", zAllocAligned,
|
||||||
|
(u8*)zAllocAligned + zAllocSize - (s32)(zAllocAligned - zAlloc));
|
||||||
|
|
||||||
Fault_AddClient(&D_801614B8, ZeldaArena_Display, NULL, NULL);
|
Fault_AddClient(&D_801614B8, ZeldaArena_Display, NULL, NULL);
|
||||||
Actor_InitContext(this, &this->actorCtx, this->playerEntry);
|
Actor_InitContext(this, &this->actorCtx, this->playerEntry);
|
||||||
|
@ -1336,7 +1337,7 @@ void Play_Main(GameState* thisx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// original name: "Game_play_demo_mode_check"
|
// original name: "Game_play_demo_mode_check"
|
||||||
s32 Play_InCsMode(PlayState* this) {
|
int Play_InCsMode(PlayState* this) {
|
||||||
return (this->csCtx.state != CS_STATE_IDLE) || Player_InCsMode(this);
|
return (this->csCtx.state != CS_STATE_IDLE) || Player_InCsMode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1773,7 +1774,7 @@ void Play_TriggerRespawn(PlayState* this) {
|
||||||
Play_LoadToLastEntrance(this);
|
Play_LoadToLastEntrance(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 Play_CamIsNotFixed(PlayState* this) {
|
int Play_CamIsNotFixed(PlayState* this) {
|
||||||
// SCENE_CAM_TYPE_FIXED_SHOP_VIEWPOINT was probably intended to be in this condition,
|
// SCENE_CAM_TYPE_FIXED_SHOP_VIEWPOINT was probably intended to be in this condition,
|
||||||
// but the room shape type check handles all shop cases regardless
|
// but the room shape type check handles all shop cases regardless
|
||||||
return (this->roomCtx.curRoom.roomShape->base.type != ROOM_SHAPE_TYPE_IMAGE) &&
|
return (this->roomCtx.curRoom.roomShape->base.type != ROOM_SHAPE_TYPE_IMAGE) &&
|
||||||
|
@ -1781,7 +1782,7 @@ s32 Play_CamIsNotFixed(PlayState* this) {
|
||||||
(R_SCENE_CAM_TYPE != SCENE_CAM_TYPE_FIXED_MARKET) && (this->sceneId != SCENE_CASTLE_COURTYARD_GUARDS_DAY);
|
(R_SCENE_CAM_TYPE != SCENE_CAM_TYPE_FIXED_MARKET) && (this->sceneId != SCENE_CASTLE_COURTYARD_GUARDS_DAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 FrameAdvance_IsEnabled(PlayState* this) {
|
int FrameAdvance_IsEnabled(PlayState* this) {
|
||||||
return !!this->frameAdvCtx.enabled;
|
return !!this->frameAdvCtx.enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,15 +18,15 @@ void Player_Update(Actor* thisx, PlayState* play);
|
||||||
void Player_Draw(Actor* thisx, PlayState* play);
|
void Player_Draw(Actor* thisx, PlayState* play);
|
||||||
|
|
||||||
ActorInit Player_InitVars = {
|
ActorInit Player_InitVars = {
|
||||||
ACTOR_PLAYER,
|
/**/ ACTOR_PLAYER,
|
||||||
ACTORCAT_PLAYER,
|
/**/ ACTORCAT_PLAYER,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_GAMEPLAY_KEEP,
|
/**/ OBJECT_GAMEPLAY_KEEP,
|
||||||
sizeof(Player),
|
/**/ sizeof(Player),
|
||||||
(ActorFunc)PlayerCall_Init,
|
/**/ PlayerCall_Init,
|
||||||
(ActorFunc)PlayerCall_Destroy,
|
/**/ PlayerCall_Destroy,
|
||||||
(ActorFunc)PlayerCall_Update,
|
/**/ PlayerCall_Update,
|
||||||
(ActorFunc)PlayerCall_Draw,
|
/**/ PlayerCall_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
void PlayerCall_InitFuncPtrs(void) {
|
void PlayerCall_InitFuncPtrs(void) {
|
||||||
|
|
|
@ -487,14 +487,14 @@ void Player_SetBootData(PlayState* play, Player* this) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 Player_InBlockingCsMode(PlayState* play, Player* this) {
|
int Player_InBlockingCsMode(PlayState* play, Player* this) {
|
||||||
return (this->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (this->csMode != PLAYER_CSMODE_NONE) ||
|
return (this->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (this->csAction != PLAYER_CSACTION_NONE) ||
|
||||||
(play->transitionTrigger == TRANS_TRIGGER_START) || (this->stateFlags1 & PLAYER_STATE1_0) ||
|
(play->transitionTrigger == TRANS_TRIGGER_START) || (this->stateFlags1 & PLAYER_STATE1_0) ||
|
||||||
(this->stateFlags3 & PLAYER_STATE3_7) ||
|
(this->stateFlags3 & PLAYER_STATE3_7) ||
|
||||||
((gSaveContext.magicState != MAGIC_STATE_IDLE) && (Player_ActionToMagicSpell(this, this->itemAction) >= 0));
|
((gSaveContext.magicState != MAGIC_STATE_IDLE) && (Player_ActionToMagicSpell(this, this->itemAction) >= 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 Player_InCsMode(PlayState* play) {
|
int Player_InCsMode(PlayState* play) {
|
||||||
Player* this = GET_PLAYER(play);
|
Player* this = GET_PLAYER(play);
|
||||||
|
|
||||||
return Player_InBlockingCsMode(play, this) || (this->unk_6AD == 4);
|
return Player_InBlockingCsMode(play, this) || (this->unk_6AD == 4);
|
||||||
|
@ -504,7 +504,7 @@ s32 func_8008E9C4(Player* this) {
|
||||||
return (this->stateFlags1 & PLAYER_STATE1_4);
|
return (this->stateFlags1 & PLAYER_STATE1_4);
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 Player_IsChildWithHylianShield(Player* this) {
|
int Player_IsChildWithHylianShield(Player* this) {
|
||||||
return gSaveContext.save.linkAge != LINK_AGE_ADULT && (this->currentShield == PLAYER_SHIELD_HYLIAN);
|
return gSaveContext.save.linkAge != LINK_AGE_ADULT && (this->currentShield == PLAYER_SHIELD_HYLIAN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -578,7 +578,7 @@ void func_8008EC70(Player* this) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player_SetEquipmentData(PlayState* play, Player* this) {
|
void Player_SetEquipmentData(PlayState* play, Player* this) {
|
||||||
if (this->csMode != PLAYER_CSMODE_86) {
|
if (this->csAction != PLAYER_CSACTION_86) {
|
||||||
this->currentShield = SHIELD_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD));
|
this->currentShield = SHIELD_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD));
|
||||||
this->currentTunic = TUNIC_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC));
|
this->currentTunic = TUNIC_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC));
|
||||||
this->currentBoots = BOOTS_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_BOOTS));
|
this->currentBoots = BOOTS_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_BOOTS));
|
||||||
|
@ -640,7 +640,7 @@ s32 func_8008EF44(PlayState* play, s32 ammo) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 Player_IsBurningStickInRange(PlayState* play, Vec3f* pos, f32 xzRange, f32 yRange) {
|
int Player_IsBurningStickInRange(PlayState* play, Vec3f* pos, f32 xzRange, f32 yRange) {
|
||||||
Player* this = GET_PLAYER(play);
|
Player* this = GET_PLAYER(play);
|
||||||
Vec3f diff;
|
Vec3f diff;
|
||||||
s32 pad;
|
s32 pad;
|
||||||
|
@ -685,7 +685,7 @@ s32 Player_HasMirrorShieldEquipped(PlayState* play) {
|
||||||
return (this->currentShield == PLAYER_SHIELD_MIRROR);
|
return (this->currentShield == PLAYER_SHIELD_MIRROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 Player_HasMirrorShieldSetToDraw(PlayState* play) {
|
int Player_HasMirrorShieldSetToDraw(PlayState* play) {
|
||||||
Player* this = GET_PLAYER(play);
|
Player* this = GET_PLAYER(play);
|
||||||
|
|
||||||
return (this->rightHandType == PLAYER_MODELTYPE_RH_SHIELD) && (this->currentShield == PLAYER_SHIELD_MIRROR);
|
return (this->rightHandType == PLAYER_MODELTYPE_RH_SHIELD) && (this->currentShield == PLAYER_SHIELD_MIRROR);
|
||||||
|
@ -701,11 +701,11 @@ s32 Player_ActionToMagicSpell(Player* this, s32 itemAction) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 Player_HoldsHookshot(Player* this) {
|
int Player_HoldsHookshot(Player* this) {
|
||||||
return (this->heldItemAction == PLAYER_IA_HOOKSHOT) || (this->heldItemAction == PLAYER_IA_LONGSHOT);
|
return (this->heldItemAction == PLAYER_IA_HOOKSHOT) || (this->heldItemAction == PLAYER_IA_LONGSHOT);
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_8008F128(Player* this) {
|
int func_8008F128(Player* this) {
|
||||||
return Player_HoldsHookshot(this) && (this->heldActor == NULL);
|
return Player_HoldsHookshot(this) && (this->heldActor == NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -731,7 +731,7 @@ s32 Player_HoldsTwoHandedWeapon(Player* this) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 Player_HoldsBrokenKnife(Player* this) {
|
int Player_HoldsBrokenKnife(Player* this) {
|
||||||
return (this->heldItemAction == PLAYER_IA_SWORD_BIGGORON) &&
|
return (this->heldItemAction == PLAYER_IA_SWORD_BIGGORON) &&
|
||||||
(gSaveContext.save.info.playerData.swordHealth <= 0.0f);
|
(gSaveContext.save.info.playerData.swordHealth <= 0.0f);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
|
||||||
f32 absf(f32 a) {
|
float absf(float n) {
|
||||||
return fabsf(a);
|
#ifndef __GNUC__
|
||||||
|
return fabsf(n);
|
||||||
|
#else
|
||||||
|
return __builtin_fabsf(n);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "global.h"
|
#include "stdlib.h"
|
||||||
|
|
||||||
ldiv_t ldiv(s32 num, s32 denom) {
|
ldiv_t ldiv(long num, long denom) {
|
||||||
ldiv_t ret;
|
ldiv_t ret;
|
||||||
|
|
||||||
ret.quot = num / denom;
|
ret.quot = num / denom;
|
||||||
|
@ -13,7 +13,7 @@ ldiv_t ldiv(s32 num, s32 denom) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
lldiv_t lldiv(s64 num, s64 denom) {
|
lldiv_t lldiv(long long num, long long denom) {
|
||||||
lldiv_t ret;
|
lldiv_t ret;
|
||||||
|
|
||||||
ret.quot = num / denom;
|
ret.quot = num / denom;
|
||||||
|
|
|
@ -1,47 +1,48 @@
|
||||||
#include "global.h"
|
// IDO Compiler Intrinsics for 64-bit arithmetic
|
||||||
|
|
||||||
s64 __ull_rshift(u64 l, s64 r) {
|
long long __ull_rshift(unsigned long long left, long long right) {
|
||||||
return l >> r;
|
return left >> right;
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 __ull_rem(u64 l, u64 r) {
|
unsigned long long __ull_rem(unsigned long long left, unsigned long long right) {
|
||||||
return l % r;
|
return left % right;
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 __ull_div(u64 l, u64 r) {
|
unsigned long long __ull_div(unsigned long long left, unsigned long long right) {
|
||||||
return l / r;
|
return left / right;
|
||||||
}
|
}
|
||||||
|
|
||||||
s64 __ll_lshift(s64 l, s64 r) {
|
long long __ll_lshift(long long left, long long right) {
|
||||||
return l << r;
|
return left << right;
|
||||||
}
|
}
|
||||||
|
|
||||||
s64 __ll_rem(s64 l, u64 r) {
|
long long __ll_rem(long long left, unsigned long long right) {
|
||||||
return l % r;
|
return left % right;
|
||||||
}
|
}
|
||||||
|
|
||||||
s64 __ll_div(s64 l, s64 r) {
|
long long __ll_div(long long left, long long right) {
|
||||||
return l / r;
|
return left / right;
|
||||||
}
|
}
|
||||||
|
|
||||||
s64 __ll_mul(s64 l, s64 r) {
|
long long __ll_mul(long long left, long long right) {
|
||||||
return l * r;
|
return left * right;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __ull_divremi(u64* quotient, u64* remainder, u64 dividend, u16 divisor) {
|
void __ull_divremi(unsigned long long int* quotient, unsigned long long int* remainder,
|
||||||
|
unsigned long long dividend, unsigned short divisor) {
|
||||||
*quotient = dividend / divisor;
|
*quotient = dividend / divisor;
|
||||||
*remainder = dividend % divisor;
|
*remainder = dividend % divisor;
|
||||||
}
|
}
|
||||||
|
|
||||||
s64 __ll_mod(s64 l, s64 r) {
|
long long __ll_mod(long long left, long long right) {
|
||||||
s64 remainder = l % r;
|
long long rem = left % right;
|
||||||
|
|
||||||
if (((remainder < 0) && (r > 0)) || ((remainder > 0) && (r < 0))) {
|
if ((rem < 0 && right > 0) || (rem > 0 && right < 0)) {
|
||||||
remainder += r;
|
rem += right;
|
||||||
}
|
}
|
||||||
return remainder;
|
return rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
s64 __ll_rshift(s64 l, s64 r) {
|
long long __ll_rshift(long long left, long long right) {
|
||||||
return l >> r;
|
return left >> right;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,33 +1,33 @@
|
||||||
#include "global.h"
|
// IDO Compiler Intrinsics for 64-bit conversion
|
||||||
|
|
||||||
s64 __d_to_ll(f64 d) {
|
long long __d_to_ll(double d) {
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
|
|
||||||
s64 __f_to_ll(f32 f) {
|
long long __f_to_ll(float f) {
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 __d_to_ull(f64 d) {
|
unsigned long long __d_to_ull(double d) {
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 __f_to_ull(f32 f) {
|
unsigned long long __f_to_ull(float f) {
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
|
|
||||||
f64 __ll_to_d(s64 l) {
|
double __ll_to_d(long long l) {
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
|
||||||
f32 __ll_to_f(s64 l) {
|
float __ll_to_f(long long l) {
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
|
||||||
f64 __ull_to_d(u64 l) {
|
double __ull_to_d(unsigned long long l) {
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
|
||||||
f32 __ull_to_f(u64 l) {
|
float __ull_to_f(unsigned long long l) {
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
|
32
src/libultra/libc/sprintf.c
Normal file
32
src/libultra/libc/sprintf.c
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
#include "stdarg.h"
|
||||||
|
#include "stdio.h"
|
||||||
|
#include "string.h"
|
||||||
|
#include "ultra64/xstdio.h"
|
||||||
|
|
||||||
|
void* proutSprintf(void* dst, const char* fmt, size_t size) {
|
||||||
|
return (char*)memcpy(dst, fmt, size) + size;
|
||||||
|
}
|
||||||
|
|
||||||
|
int vsprintf(char* dst, const char* fmt, va_list args) {
|
||||||
|
int ret = _Printf(proutSprintf, dst, fmt, args);
|
||||||
|
|
||||||
|
if (ret > -1) {
|
||||||
|
dst[ret] = '\0';
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
int sprintf(char* dst, const char* fmt, ...) {
|
||||||
|
int ret;
|
||||||
|
va_list args;
|
||||||
|
va_start(args, fmt);
|
||||||
|
|
||||||
|
ret = _Printf(proutSprintf, dst, fmt, args);
|
||||||
|
if (ret > -1) {
|
||||||
|
dst[ret] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
va_end(args);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
|
||||||
|
double sqrt(double f) {
|
||||||
#ifndef __GNUC__
|
#ifndef __GNUC__
|
||||||
#define __builtin_sqrt sqrt
|
return sqrt(f);
|
||||||
#endif
|
#else
|
||||||
|
|
||||||
f64 sqrt(f64 f) {
|
|
||||||
return __builtin_sqrt(f);
|
return __builtin_sqrt(f);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
#include "global.h"
|
#include "string.h"
|
||||||
|
|
||||||
const char* strchr(const char* str, s32 ch) {
|
char* strchr(const char* str, int c) {
|
||||||
u8 c = ch;
|
char ch = c;
|
||||||
|
|
||||||
while (*str != c) {
|
while (*str != ch) {
|
||||||
if (*str == 0) {
|
if (*str == 0) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
str++;
|
str++;
|
||||||
}
|
}
|
||||||
return str;
|
return (char*)str;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 strlen(const char* str) {
|
size_t strlen(const char* str) {
|
||||||
const char* ptr = str;
|
const char* ptr = str;
|
||||||
|
|
||||||
while (*ptr) {
|
while (*ptr) {
|
||||||
|
@ -21,13 +21,13 @@ u32 strlen(const char* str) {
|
||||||
return ptr - str;
|
return ptr - str;
|
||||||
}
|
}
|
||||||
|
|
||||||
void* memcpy(void* dst, const void* src, size_t size) {
|
void* memcpy(void* dst, const void* src, size_t n) {
|
||||||
u8* _dst = dst;
|
char* _dst = dst;
|
||||||
const u8* _src = src;
|
const char* _src = src;
|
||||||
|
|
||||||
while (size > 0) {
|
while (n > 0) {
|
||||||
*_dst++ = *_src++;
|
*_dst++ = *_src++;
|
||||||
size--;
|
n--;
|
||||||
}
|
}
|
||||||
return dst;
|
return dst;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
#include "global.h"
|
#include "stdlib.h"
|
||||||
|
#include "string.h"
|
||||||
|
#include "ultra64/xstdio.h"
|
||||||
|
|
||||||
#define BUFF_LEN 0x20
|
#define BUFF_LEN 0x20
|
||||||
|
|
||||||
s16 _Ldunscale(s16*, _Pft*);
|
short _Ldunscale(short*, _Pft*);
|
||||||
void _Genld(_Pft*, u8, u8*, s16, s16);
|
void _Genld(_Pft*, char, char*, short, short);
|
||||||
|
|
||||||
const f64 D_800122E0[] = { 10e0L, 10e1L, 10e3L, 10e7L, 10e15L, 10e31L, 10e63L, 10e127L, 10e255L };
|
static const double pows[] = { 10e0L, 10e1L, 10e3L, 10e7L, 10e15L, 10e31L, 10e63L, 10e127L, 10e255L };
|
||||||
|
|
||||||
/* float properties */
|
// float properties
|
||||||
#define _D0 0
|
#define _D0 0
|
||||||
#define _DBIAS 0x3FF
|
#define _DBIAS 0x3FF
|
||||||
#define _DLONG 1
|
#define _DLONG 1
|
||||||
|
@ -17,7 +19,8 @@ const f64 D_800122E0[] = { 10e0L, 10e1L, 10e3L, 10e7L, 10e15L, 10e31L, 10e63L, 1
|
||||||
#define _FRND 1
|
#define _FRND 1
|
||||||
#define _LBIAS 0x3FFE
|
#define _LBIAS 0x3FFE
|
||||||
#define _LOFF 15
|
#define _LOFF 15
|
||||||
/* integer properties */
|
|
||||||
|
// integer properties
|
||||||
#define _C2 1
|
#define _C2 1
|
||||||
#define _CSIGN 1
|
#define _CSIGN 1
|
||||||
#define _ILONG 0
|
#define _ILONG 0
|
||||||
|
@ -31,38 +34,26 @@ const f64 D_800122E0[] = { 10e0L, 10e1L, 10e3L, 10e7L, 10e15L, 10e31L, 10e63L, 1
|
||||||
#define _DNAN (0x8000 | _DMAX << _DOFF | 1 << (_DOFF - 1))
|
#define _DNAN (0x8000 | _DMAX << _DOFF | 1 << (_DOFF - 1))
|
||||||
#define _DSIGN 0x8000
|
#define _DSIGN 0x8000
|
||||||
#if _D0 == 3
|
#if _D0 == 3
|
||||||
#define _D1 2 /* little-endian order */
|
#define _D1 2 // little-endian order
|
||||||
#define _D2 1
|
#define _D2 1
|
||||||
#define _D3 0
|
#define _D3 0
|
||||||
#else
|
#else
|
||||||
#define _D1 1 /* big-endian order */
|
#define _D1 1 // big-endian order
|
||||||
#define _D2 2
|
#define _D2 2
|
||||||
#define _D3 3
|
#define _D3 3
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void _Ldtob(_Pft* args, u8 type) {
|
void _Ldtob(_Pft* args, char code) {
|
||||||
u8 buff[BUFF_LEN];
|
char buff[BUFF_LEN];
|
||||||
u8* ptr = buff;
|
char* ptr = buff;
|
||||||
u32 sp70;
|
LONG_DOUBLE_TYPE val = args->v.ld;
|
||||||
f64 val = args->v.ld;
|
short err;
|
||||||
/* maybe struct? */
|
short nsig;
|
||||||
s16 err;
|
short exp;
|
||||||
s16 nsig;
|
|
||||||
s16 exp;
|
|
||||||
|
|
||||||
s32 i;
|
|
||||||
s32 n;
|
|
||||||
f64 factor;
|
|
||||||
s32 gen;
|
|
||||||
s32 j;
|
|
||||||
s32 lo;
|
|
||||||
ldiv_t qr;
|
|
||||||
u8 drop;
|
|
||||||
s32 n2;
|
|
||||||
|
|
||||||
if (args->prec < 0) {
|
if (args->prec < 0) {
|
||||||
args->prec = 6;
|
args->prec = 6;
|
||||||
} else if (args->prec == 0 && (type == 'g' || type == 'G')) {
|
} else if (args->prec == 0 && (code == 'g' || code == 'G')) {
|
||||||
args->prec = 1;
|
args->prec = 1;
|
||||||
}
|
}
|
||||||
err = _Ldunscale(&exp, (_Pft*)args);
|
err = _Ldunscale(&exp, (_Pft*)args);
|
||||||
|
@ -74,16 +65,22 @@ void _Ldtob(_Pft* args, u8 type) {
|
||||||
nsig = 0;
|
nsig = 0;
|
||||||
exp = 0;
|
exp = 0;
|
||||||
} else {
|
} else {
|
||||||
|
int i;
|
||||||
|
int n;
|
||||||
|
double factor;
|
||||||
|
int gen;
|
||||||
|
|
||||||
if (val < 0) {
|
if (val < 0) {
|
||||||
val = -val;
|
val = -val;
|
||||||
}
|
}
|
||||||
exp = exp * 30103 / 0x000186A0 - 4;
|
|
||||||
|
exp = exp * 30103 / 100000 - 4;
|
||||||
if (exp < 0) {
|
if (exp < 0) {
|
||||||
n = (3 - exp) & ~3;
|
n = (3 - exp) & ~3;
|
||||||
exp = -n;
|
exp = -n;
|
||||||
for (i = 0; n > 0; n >>= 1, i++) {
|
for (i = 0; n > 0; n >>= 1, i++) {
|
||||||
if ((n & 1) != 0) {
|
if ((n & 1) != 0) {
|
||||||
val *= D_800122E0[i];
|
val *= pows[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (exp > 0) {
|
} else if (exp > 0) {
|
||||||
|
@ -92,27 +89,33 @@ void _Ldtob(_Pft* args, u8 type) {
|
||||||
|
|
||||||
for (n = exp, i = 0; n > 0; n >>= 1, i++) {
|
for (n = exp, i = 0; n > 0; n >>= 1, i++) {
|
||||||
if ((n & 1) != 0) {
|
if ((n & 1) != 0) {
|
||||||
factor *= D_800122E0[i];
|
factor *= pows[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
val /= factor;
|
val /= factor;
|
||||||
}
|
}
|
||||||
gen = ((type == 'f') ? exp + 10 : 6) + args->prec;
|
|
||||||
|
gen = ((code == 'f') ? exp + 10 : 6) + args->prec;
|
||||||
if (gen > 0x13) {
|
if (gen > 0x13) {
|
||||||
gen = 0x13;
|
gen = 0x13;
|
||||||
}
|
}
|
||||||
|
|
||||||
*ptr++ = '0';
|
*ptr++ = '0';
|
||||||
while (gen > 0 && 0 < val) {
|
while (gen > 0 && 0 < val) {
|
||||||
lo = val;
|
int j;
|
||||||
|
int lo = val;
|
||||||
|
|
||||||
if ((gen -= 8) > 0) {
|
if ((gen -= 8) > 0) {
|
||||||
val = (val - lo) * 1.0e8;
|
val = (val - lo) * 1.0e8;
|
||||||
}
|
}
|
||||||
ptr = ptr + 8;
|
ptr += 8;
|
||||||
|
|
||||||
for (j = 8; lo > 0 && --j >= 0;) {
|
for (j = 8; lo > 0 && --j >= 0;) {
|
||||||
qr = ldiv(lo, 10);
|
ldiv_t qr = ldiv(lo, 10);
|
||||||
*--ptr = qr.rem + '0';
|
*--ptr = qr.rem + '0';
|
||||||
lo = qr.quot;
|
lo = qr.quot;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (--j >= 0) {
|
while (--j >= 0) {
|
||||||
ptr--;
|
ptr--;
|
||||||
*ptr = '0';
|
*ptr = '0';
|
||||||
|
@ -125,11 +128,14 @@ void _Ldtob(_Pft* args, u8 type) {
|
||||||
--gen, --exp;
|
--gen, --exp;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsig = ((type == 'f') ? exp + 1 : ((type == 'e' || type == 'E') ? 1 : 0)) + args->prec;
|
nsig = ((code == 'f') ? exp + 1 : ((code == 'e' || code == 'E') ? 1 : 0)) + args->prec;
|
||||||
if (gen < nsig) {
|
if (gen < nsig) {
|
||||||
nsig = gen;
|
nsig = gen;
|
||||||
}
|
}
|
||||||
if (nsig > 0) {
|
if (nsig > 0) {
|
||||||
|
char drop;
|
||||||
|
int n2;
|
||||||
|
|
||||||
if (nsig < gen && ptr[nsig] > '4') {
|
if (nsig < gen && ptr[nsig] > '4') {
|
||||||
drop = '9';
|
drop = '9';
|
||||||
} else {
|
} else {
|
||||||
|
@ -147,16 +153,16 @@ void _Ldtob(_Pft* args, u8 type) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_Genld((_Pft*)args, type, ptr, nsig, exp);
|
_Genld((_Pft*)args, code, ptr, nsig, exp);
|
||||||
}
|
}
|
||||||
|
|
||||||
s16 _Ldunscale(s16* pex, _Pft* px) {
|
short _Ldunscale(short* pex, _Pft* px) {
|
||||||
u16* ps = (u16*)px;
|
unsigned short* ps = (unsigned short*)px;
|
||||||
s16 xchar = (ps[_D0] & _DMASK) >> _DOFF;
|
short xchar = (ps[_D0] & _DMASK) >> _DOFF;
|
||||||
|
|
||||||
if (xchar == _DMAX) { /* NaN or INF */
|
if (xchar == _DMAX) { /* NaN or INF */
|
||||||
*pex = 0;
|
*pex = 0;
|
||||||
return (s16)(ps[_D0] & _DFRAC || ps[_D1] || ps[_D2] || ps[_D3] ? NAN : INF);
|
return (short)(ps[_D0] & _DFRAC || ps[_D1] || ps[_D2] || ps[_D3] ? NAN : INF);
|
||||||
} else if (0 < xchar) {
|
} else if (0 < xchar) {
|
||||||
ps[_D0] = (ps[_D0] & ~_DMASK) | (_DBIAS << _DOFF);
|
ps[_D0] = (ps[_D0] & ~_DMASK) | (_DBIAS << _DOFF);
|
||||||
*pex = xchar - (_DBIAS - 1);
|
*pex = xchar - (_DBIAS - 1);
|
||||||
|
@ -170,13 +176,13 @@ s16 _Ldunscale(s16* pex, _Pft* px) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _Genld(_Pft* px, u8 code, u8* p, s16 nsig, s16 xexp) {
|
void _Genld(_Pft* px, char code, char* p, short nsig, short xexp) {
|
||||||
u8 point = '.';
|
const char point = '.';
|
||||||
|
|
||||||
if (nsig <= 0) {
|
if (nsig <= 0) {
|
||||||
nsig = 1,
|
nsig = 1,
|
||||||
|
|
||||||
p = (u8*)"0";
|
p = (char*)"0";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (code == 'f' || ((code == 'g' || code == 'G') && (-4 <= xexp) && (xexp < px->prec))) { /* 'f' format */
|
if (code == 'f' || ((code == 'g' || code == 'G') && (-4 <= xexp) && (xexp < px->prec))) { /* 'f' format */
|
||||||
|
@ -248,7 +254,7 @@ void _Genld(_Pft* px, u8 code, u8* p, s16 nsig, s16 xexp) {
|
||||||
px->n1 += nsig;
|
px->n1 += nsig;
|
||||||
px->nz1 = px->prec - nsig;
|
px->nz1 = px->prec - nsig;
|
||||||
}
|
}
|
||||||
p = (u8*)&px->s[px->n1]; /* put exponent */
|
p = &px->s[px->n1]; /* put exponent */
|
||||||
*p++ = code;
|
*p++ = code;
|
||||||
if (0 <= xexp) {
|
if (0 <= xexp) {
|
||||||
*p++ = '+';
|
*p++ = '+';
|
||||||
|
@ -264,10 +270,10 @@ void _Genld(_Pft* px, u8 code, u8* p, s16 nsig, s16 xexp) {
|
||||||
}
|
}
|
||||||
*p++ = xexp / 10 + '0', xexp %= 10;
|
*p++ = xexp / 10 + '0', xexp %= 10;
|
||||||
*p++ = xexp + '0';
|
*p++ = xexp + '0';
|
||||||
px->n2 = p - (u8*)&px->s[px->n1];
|
px->n2 = p - &px->s[px->n1];
|
||||||
}
|
}
|
||||||
if ((px->flags & (FLAGS_ZERO | FLAGS_MINUS)) == FLAGS_ZERO) { /* pad with leading zeros */
|
if ((px->flags & (FLAGS_ZERO | FLAGS_MINUS)) == FLAGS_ZERO) { /* pad with leading zeros */
|
||||||
s32 n = px->n0 + px->n1 + px->nz1 + px->n2 + px->nz2;
|
int n = px->n0 + px->n1 + px->nz1 + px->n2 + px->nz2;
|
||||||
|
|
||||||
if (n < px->width) {
|
if (n < px->width) {
|
||||||
px->nz0 = px->width - n;
|
px->nz0 = px->width - n;
|
58
src/libultra/libc/xlitob.c
Normal file
58
src/libultra/libc/xlitob.c
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
#include "stdlib.h"
|
||||||
|
#include "string.h"
|
||||||
|
#include "ultra64/xstdio.h"
|
||||||
|
|
||||||
|
#define BUFF_LEN 0x18
|
||||||
|
|
||||||
|
static char ldigs[] = "0123456789abcdef";
|
||||||
|
static char udigs[] = "0123456789ABCDEF";
|
||||||
|
|
||||||
|
void _Litob(_Pft* args, char type) {
|
||||||
|
char buff[BUFF_LEN];
|
||||||
|
const char* digs;
|
||||||
|
int base;
|
||||||
|
int i;
|
||||||
|
unsigned long long num;
|
||||||
|
|
||||||
|
if (type == 'X') {
|
||||||
|
digs = udigs;
|
||||||
|
} else {
|
||||||
|
digs = ldigs;
|
||||||
|
}
|
||||||
|
|
||||||
|
base = (type == 'o') ? 8 : ((type != 'x' && type != 'X') ? 10 : 16);
|
||||||
|
i = BUFF_LEN;
|
||||||
|
num = args->v.ll;
|
||||||
|
|
||||||
|
if ((type == 'd' || type == 'i') && args->v.ll < 0) {
|
||||||
|
num = -num;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (num != 0 || args->prec != 0) {
|
||||||
|
buff[--i] = digs[num % base];
|
||||||
|
}
|
||||||
|
|
||||||
|
args->v.ll = num / base;
|
||||||
|
|
||||||
|
while (args->v.ll > 0 && i > 0) {
|
||||||
|
lldiv_t quotrem = lldiv(args->v.ll, base);
|
||||||
|
|
||||||
|
args->v.ll = quotrem.quot;
|
||||||
|
buff[--i] = digs[quotrem.rem];
|
||||||
|
}
|
||||||
|
|
||||||
|
args->n1 = BUFF_LEN - i;
|
||||||
|
|
||||||
|
memcpy(args->s, buff + i, args->n1);
|
||||||
|
|
||||||
|
if (args->n1 < args->prec) {
|
||||||
|
args->nz0 = args->prec - args->n1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (args->prec < 0 && (args->flags & (FLAGS_ZERO | FLAGS_MINUS)) == FLAGS_ZERO) {
|
||||||
|
i = args->width - args->n0 - args->nz0 - args->n1;
|
||||||
|
if (i > 0) {
|
||||||
|
args->nz0 += i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,11 +1,19 @@
|
||||||
#include "global.h"
|
#include "stdarg.h"
|
||||||
|
#include "stdbool.h"
|
||||||
|
#include "stdint.h"
|
||||||
|
#include "stdlib.h"
|
||||||
|
#include "string.h"
|
||||||
|
#include "ultra64/xstdio.h"
|
||||||
|
|
||||||
#define ATOI(i, a) \
|
#define isdigit(x) (((x) >= '0' && (x) <= '9'))
|
||||||
for (i = 0; *a >= '0' && *a <= '9'; a++) \
|
#define LDSIGN(x) (((unsigned short*)&(x))[0] & 0x8000)
|
||||||
if (i < 999) \
|
|
||||||
|
#define ATOI(i, a) \
|
||||||
|
for (i = 0; isdigit(*a); a++) \
|
||||||
|
if (i < 999) \
|
||||||
i = *a + i * 10 - '0';
|
i = *a + i * 10 - '0';
|
||||||
|
|
||||||
#define _PROUT(fmt, _size) \
|
#define PUT(fmt, _size) \
|
||||||
if (_size > 0) { \
|
if (_size > 0) { \
|
||||||
arg = pfn(arg, fmt, _size); \
|
arg = pfn(arg, fmt, _size); \
|
||||||
if (arg != NULL) \
|
if (arg != NULL) \
|
||||||
|
@ -13,51 +21,57 @@
|
||||||
else \
|
else \
|
||||||
return x.nchar; \
|
return x.nchar; \
|
||||||
}
|
}
|
||||||
#define _PAD(m, src, extracond) \
|
|
||||||
if (extracond && m > 0) { \
|
#define MAX_PAD ((int)sizeof(spaces) - 1)
|
||||||
s32 i; \
|
|
||||||
s32 j; \
|
#define PAD(src, m) \
|
||||||
for (j = m; j > 0; j -= i) { \
|
if (m > 0) { \
|
||||||
if ((u32)j > 32) \
|
int i; \
|
||||||
i = 32; \
|
int j; \
|
||||||
else \
|
for (j = m; j > 0; j -= i) { \
|
||||||
i = j; \
|
if ((unsigned)j > MAX_PAD) \
|
||||||
_PROUT(src, i); \
|
i = MAX_PAD; \
|
||||||
} \
|
else \
|
||||||
|
i = j; \
|
||||||
|
PUT(src, i); \
|
||||||
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
char spaces[] = " ";
|
char spaces[] = " ";
|
||||||
char zeroes[] = "00000000000000000000000000000000";
|
char zeroes[] = "00000000000000000000000000000000";
|
||||||
|
|
||||||
void _Putfld(_Pft*, va_list*, u8, u8*);
|
void _Putfld(_Pft*, va_list*, char, char*);
|
||||||
|
|
||||||
s32 _Printf(PrintCallback pfn, void* arg, const char* fmt, va_list ap) {
|
int _Printf(PrintCallback pfn, void* arg, const char* fmt, va_list ap) {
|
||||||
_Pft x;
|
_Pft x;
|
||||||
x.nchar = 0;
|
x.nchar = 0;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
static const char fchar[] = " +-#0";
|
static const char fchar[] = " +-#0";
|
||||||
static const u32 fbit[] = { FLAGS_SPACE, FLAGS_PLUS, FLAGS_MINUS, FLAGS_HASH, FLAGS_ZERO, 0 };
|
static const unsigned int fbit[] = { FLAGS_SPACE, FLAGS_PLUS, FLAGS_MINUS, FLAGS_HASH, FLAGS_ZERO, 0 };
|
||||||
|
|
||||||
const u8* s = (u8*)fmt;
|
const char* s = fmt;
|
||||||
u8 c;
|
char c;
|
||||||
const char* t;
|
const char* t;
|
||||||
u8 ac[0x20];
|
char ac[0x20];
|
||||||
|
|
||||||
while ((c = *s) != 0 && c != '%') {
|
while ((c = *s) != 0 && c != '%') {
|
||||||
s++;
|
s++;
|
||||||
}
|
}
|
||||||
_PROUT(fmt, s - (u8*)fmt);
|
|
||||||
|
PUT(fmt, s - fmt);
|
||||||
if (c == 0) {
|
if (c == 0) {
|
||||||
return x.nchar;
|
return x.nchar;
|
||||||
}
|
}
|
||||||
fmt = (char*)++s;
|
|
||||||
x.flags = 0;
|
fmt = ++s;
|
||||||
for (; (t = strchr(fchar, *s)) != NULL; s++) {
|
|
||||||
|
for (x.flags = 0; (t = strchr(fchar, *s)) != NULL; s++) {
|
||||||
x.flags |= fbit[t - fchar];
|
x.flags |= fbit[t - fchar];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*s == '*') {
|
if (*s == '*') {
|
||||||
x.width = va_arg(ap, s32);
|
x.width = va_arg(ap, int);
|
||||||
if (x.width < 0) {
|
if (x.width < 0) {
|
||||||
x.width = -x.width;
|
x.width = -x.width;
|
||||||
x.flags |= FLAGS_MINUS;
|
x.flags |= FLAGS_MINUS;
|
||||||
|
@ -66,21 +80,23 @@ s32 _Printf(PrintCallback pfn, void* arg, const char* fmt, va_list ap) {
|
||||||
} else {
|
} else {
|
||||||
ATOI(x.width, s);
|
ATOI(x.width, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*s != '.') {
|
if (*s != '.') {
|
||||||
x.prec = -1;
|
x.prec = -1;
|
||||||
} else {
|
} else {
|
||||||
s++;
|
s++;
|
||||||
if (*s == '*') {
|
if (*s == '*') {
|
||||||
x.prec = va_arg(ap, s32);
|
x.prec = va_arg(ap, int);
|
||||||
s++;
|
s++;
|
||||||
} else {
|
} else {
|
||||||
ATOI(x.prec, s);
|
ATOI(x.prec, s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strchr("hlL", *s) != NULL) {
|
if (strchr("hlL", *s) != NULL) {
|
||||||
x.qual = *s++;
|
x.qual = *s++;
|
||||||
} else {
|
} else {
|
||||||
x.qual = 0;
|
x.qual = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x.qual == 'l' && *s == 'l') {
|
if (x.qual == 'l' && *s == 'l') {
|
||||||
|
@ -89,38 +105,42 @@ s32 _Printf(PrintCallback pfn, void* arg, const char* fmt, va_list ap) {
|
||||||
}
|
}
|
||||||
_Putfld(&x, &ap, *s, ac);
|
_Putfld(&x, &ap, *s, ac);
|
||||||
x.width -= x.n0 + x.nz0 + x.n1 + x.nz1 + x.n2 + x.nz2;
|
x.width -= x.n0 + x.nz0 + x.n1 + x.nz1 + x.n2 + x.nz2;
|
||||||
_PAD(x.width, spaces, !(x.flags & FLAGS_MINUS));
|
if (!(x.flags & FLAGS_MINUS)) {
|
||||||
_PROUT((char*)ac, x.n0);
|
PAD(spaces, x.width);
|
||||||
_PAD(x.nz0, zeroes, 1);
|
}
|
||||||
_PROUT(x.s, x.n1);
|
PUT(ac, x.n0);
|
||||||
_PAD(x.nz1, zeroes, 1);
|
PAD(zeroes, x.nz0);
|
||||||
_PROUT((char*)(&x.s[x.n1]), x.n2)
|
PUT(x.s, x.n1);
|
||||||
_PAD(x.nz2, zeroes, 1);
|
PAD(zeroes, x.nz1);
|
||||||
_PAD(x.width, spaces, x.flags & FLAGS_MINUS);
|
PUT(&x.s[x.n1], x.n2)
|
||||||
fmt = (char*)s + 1;
|
PAD(zeroes, x.nz2);
|
||||||
|
if (x.flags & FLAGS_MINUS) {
|
||||||
|
PAD(spaces, x.width);
|
||||||
|
}
|
||||||
|
fmt = s + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _Putfld(_Pft* px, va_list* pap, u8 code, u8* ac) {
|
void _Putfld(_Pft* px, va_list* pap, char code, char* ac) {
|
||||||
px->n0 = px->nz0 = px->n1 = px->nz1 = px->n2 = px->nz2 = 0;
|
px->n0 = px->nz0 = px->n1 = px->nz1 = px->n2 = px->nz2 = 0;
|
||||||
|
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case 'c':
|
case 'c':
|
||||||
ac[px->n0++] = va_arg(*pap, u32);
|
ac[px->n0++] = va_arg(*pap, unsigned int);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'd':
|
case 'd':
|
||||||
case 'i':
|
case 'i':
|
||||||
if (px->qual == 'l') {
|
if (px->qual == 'l') {
|
||||||
px->v.ll = va_arg(*pap, s32);
|
px->v.ll = va_arg(*pap, long);
|
||||||
} else if (px->qual == 'L') {
|
} else if (px->qual == 'L') {
|
||||||
px->v.ll = va_arg(*pap, s64);
|
px->v.ll = va_arg(*pap, long long);
|
||||||
} else {
|
} else {
|
||||||
px->v.ll = va_arg(*pap, s32);
|
px->v.ll = va_arg(*pap, int);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (px->qual == 'h') {
|
if (px->qual == 'h') {
|
||||||
px->v.ll = (s16)px->v.ll;
|
px->v.ll = (short)px->v.ll;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (px->v.ll < 0) {
|
if (px->v.ll < 0) {
|
||||||
|
@ -131,75 +151,76 @@ void _Putfld(_Pft* px, va_list* pap, u8 code, u8* ac) {
|
||||||
ac[px->n0++] = ' ';
|
ac[px->n0++] = ' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
px->s = (char*)&ac[px->n0];
|
px->s = &ac[px->n0];
|
||||||
|
|
||||||
_Litob(px, code);
|
_Litob(px, code);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'x':
|
case 'x':
|
||||||
case 'X':
|
case 'X':
|
||||||
case 'u':
|
case 'u':
|
||||||
case 'o':
|
case 'o':
|
||||||
if (px->qual == 'l') {
|
if (px->qual == 'l') {
|
||||||
px->v.ll = va_arg(*pap, s32);
|
px->v.ll = va_arg(*pap, long);
|
||||||
} else if (px->qual == 'L') {
|
} else if (px->qual == 'L') {
|
||||||
px->v.ll = va_arg(*pap, s64);
|
px->v.ll = va_arg(*pap, long long);
|
||||||
} else {
|
} else {
|
||||||
px->v.ll = va_arg(*pap, s32);
|
px->v.ll = va_arg(*pap, int);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (px->qual == 'h') {
|
if (px->qual == 'h') {
|
||||||
px->v.ll = (u16)px->v.ll;
|
px->v.ll = (unsigned short)px->v.ll;
|
||||||
} else if (px->qual == 0) {
|
} else if (px->qual == '\0') {
|
||||||
px->v.ll = (u32)px->v.ll;
|
px->v.ll = (unsigned int)px->v.ll;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (px->flags & FLAGS_HASH) {
|
if (px->flags & FLAGS_HASH) {
|
||||||
ac[px->n0++] = '0';
|
ac[px->n0++] = '0';
|
||||||
if (code == 'x' || code == 'X') {
|
if (code == 'x' || code == 'X') {
|
||||||
|
|
||||||
ac[px->n0++] = code;
|
ac[px->n0++] = code;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
px->s = (char*)&ac[px->n0];
|
px->s = &ac[px->n0];
|
||||||
_Litob(px, code);
|
_Litob(px, code);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'e':
|
case 'e':
|
||||||
case 'f':
|
case 'f':
|
||||||
case 'g':
|
case 'g':
|
||||||
case 'E':
|
case 'E':
|
||||||
case 'G':
|
case 'G':
|
||||||
px->v.ld = px->qual == 'L' ? va_arg(*pap, f64) : va_arg(*pap, f64);
|
px->v.ld = px->qual == 'L' ? va_arg(*pap, LONG_DOUBLE_TYPE) : va_arg(*pap, double);
|
||||||
|
|
||||||
if (*(u16*)&px->v.ll & 0x8000) {
|
if (LDSIGN(px->v.ld)) {
|
||||||
ac[px->n0++] = '-';
|
ac[px->n0++] = '-';
|
||||||
} else {
|
} else if (px->flags & FLAGS_PLUS) {
|
||||||
if (px->flags & FLAGS_PLUS) {
|
ac[px->n0++] = '+';
|
||||||
ac[px->n0++] = '+';
|
} else if (px->flags & FLAGS_SPACE) {
|
||||||
} else if (px->flags & FLAGS_SPACE) {
|
ac[px->n0++] = ' ';
|
||||||
ac[px->n0++] = ' ';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
px->s = (char*)&ac[px->n0];
|
px->s = &ac[px->n0];
|
||||||
_Ldtob(px, code);
|
_Ldtob(px, code);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'n':
|
case 'n':
|
||||||
if (px->qual == 'h') {
|
if (px->qual == 'h') {
|
||||||
*(va_arg(*pap, u16*)) = px->nchar;
|
*(va_arg(*pap, unsigned short*)) = px->nchar;
|
||||||
} else if (px->qual == 'l') {
|
} else if (px->qual == 'l') {
|
||||||
*va_arg(*pap, u32*) = px->nchar;
|
*va_arg(*pap, unsigned long*) = px->nchar;
|
||||||
} else if (px->qual == 'L') {
|
} else if (px->qual == 'L') {
|
||||||
*va_arg(*pap, u64*) = px->nchar;
|
*va_arg(*pap, unsigned long long*) = px->nchar;
|
||||||
} else {
|
} else {
|
||||||
*va_arg(*pap, u32*) = px->nchar;
|
*va_arg(*pap, unsigned int*) = px->nchar;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'p':
|
case 'p':
|
||||||
px->v.ll = (s32)va_arg(*pap, void*);
|
px->v.ll = (intptr_t)va_arg(*pap, void*);
|
||||||
px->s = (char*)&ac[px->n0];
|
px->s = &ac[px->n0];
|
||||||
_Litob(px, 'x');
|
_Litob(px, 'x');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 's':
|
case 's':
|
||||||
px->s = va_arg(*pap, char*);
|
px->s = va_arg(*pap, char*);
|
||||||
px->n1 = strlen(px->s);
|
px->n1 = strlen(px->s);
|
||||||
|
@ -207,9 +228,11 @@ void _Putfld(_Pft* px, va_list* pap, u8 code, u8* ac) {
|
||||||
px->n1 = px->prec;
|
px->n1 = px->prec;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '%':
|
case '%':
|
||||||
ac[px->n0++] = '%';
|
ac[px->n0++] = '%';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ac[px->n0++] = code;
|
ac[px->n0++] = code;
|
||||||
break;
|
break;
|
|
@ -1,28 +0,0 @@
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
void* proutSprintf(void* dst, const char* fmt, u32 size) {
|
|
||||||
return (void*)((u32)memcpy(dst, fmt, size) + size);
|
|
||||||
}
|
|
||||||
|
|
||||||
s32 vsprintf(char* dst, const char* fmt, va_list args) {
|
|
||||||
s32 ret = _Printf(proutSprintf, dst, fmt, args);
|
|
||||||
if (ret > -1) {
|
|
||||||
dst[ret] = '\0';
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
s32 sprintf(char* dst, const char* fmt, ...) {
|
|
||||||
s32 ret;
|
|
||||||
va_list args;
|
|
||||||
va_start(args, fmt);
|
|
||||||
|
|
||||||
ret = _Printf(proutSprintf, dst, fmt, args);
|
|
||||||
if (ret > -1) {
|
|
||||||
dst[ret] = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
va_end(args);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
|
@ -1,56 +0,0 @@
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
#define BUFF_LEN 0x18
|
|
||||||
|
|
||||||
u8 D_8000AF70[] = "0123456789abcdef";
|
|
||||||
u8 D_8000AF84[] = "0123456789ABCDEF";
|
|
||||||
|
|
||||||
void _Litob(_Pft* args, u8 type) {
|
|
||||||
u8 buff[BUFF_LEN];
|
|
||||||
const u8* numMap;
|
|
||||||
s32 base;
|
|
||||||
s32 idx;
|
|
||||||
u64 num;
|
|
||||||
lldiv_t quotrem;
|
|
||||||
|
|
||||||
if (type == 'X') {
|
|
||||||
numMap = D_8000AF84;
|
|
||||||
} else {
|
|
||||||
numMap = D_8000AF70;
|
|
||||||
}
|
|
||||||
|
|
||||||
base = (type == 'o') ? 8 : ((type != 'x' && type != 'X') ? 10 : 16);
|
|
||||||
idx = BUFF_LEN;
|
|
||||||
num = args->v.ll;
|
|
||||||
|
|
||||||
if ((type == 'd' || type == 'i') && args->v.ll < 0) {
|
|
||||||
num = -num;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (num != 0 || args->prec != 0) {
|
|
||||||
buff[--idx] = numMap[num % base];
|
|
||||||
}
|
|
||||||
|
|
||||||
args->v.ll = num / base;
|
|
||||||
|
|
||||||
while (args->v.ll > 0 && idx > 0) {
|
|
||||||
quotrem = lldiv(args->v.ll, base);
|
|
||||||
args->v.ll = quotrem.quot;
|
|
||||||
buff[--idx] = numMap[quotrem.rem];
|
|
||||||
}
|
|
||||||
|
|
||||||
args->n1 = BUFF_LEN - idx;
|
|
||||||
|
|
||||||
memcpy(args->s, buff + idx, args->n1);
|
|
||||||
|
|
||||||
if (args->n1 < args->prec) {
|
|
||||||
args->nz0 = args->prec - args->n1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args->prec < 0 && (args->flags & (FLAGS_ZERO | FLAGS_MINUS)) == FLAGS_ZERO) {
|
|
||||||
idx = args->width - args->n0 - args->nz0 - args->n1;
|
|
||||||
if (idx > 0) {
|
|
||||||
args->nz0 += idx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -12,15 +12,15 @@ void ArmsHook_Wait(ArmsHook* this, PlayState* play);
|
||||||
void ArmsHook_Shoot(ArmsHook* this, PlayState* play);
|
void ArmsHook_Shoot(ArmsHook* this, PlayState* play);
|
||||||
|
|
||||||
ActorInit Arms_Hook_InitVars = {
|
ActorInit Arms_Hook_InitVars = {
|
||||||
ACTOR_ARMS_HOOK,
|
/**/ ACTOR_ARMS_HOOK,
|
||||||
ACTORCAT_ITEMACTION,
|
/**/ ACTORCAT_ITEMACTION,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_LINK_BOY,
|
/**/ OBJECT_LINK_BOY,
|
||||||
sizeof(ArmsHook),
|
/**/ sizeof(ArmsHook),
|
||||||
(ActorFunc)ArmsHook_Init,
|
/**/ ArmsHook_Init,
|
||||||
(ActorFunc)ArmsHook_Destroy,
|
/**/ ArmsHook_Destroy,
|
||||||
(ActorFunc)ArmsHook_Update,
|
/**/ ArmsHook_Update,
|
||||||
(ActorFunc)ArmsHook_Draw,
|
/**/ ArmsHook_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColliderQuadInit sQuadInit = {
|
static ColliderQuadInit sQuadInit = {
|
||||||
|
|
|
@ -21,15 +21,15 @@ void ArrowFire_Hit(ArrowFire* this, PlayState* play);
|
||||||
#include "assets/overlays/ovl_Arrow_Fire/ovl_Arrow_Fire.c"
|
#include "assets/overlays/ovl_Arrow_Fire/ovl_Arrow_Fire.c"
|
||||||
|
|
||||||
ActorInit Arrow_Fire_InitVars = {
|
ActorInit Arrow_Fire_InitVars = {
|
||||||
ACTOR_ARROW_FIRE,
|
/**/ ACTOR_ARROW_FIRE,
|
||||||
ACTORCAT_ITEMACTION,
|
/**/ ACTORCAT_ITEMACTION,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_GAMEPLAY_KEEP,
|
/**/ OBJECT_GAMEPLAY_KEEP,
|
||||||
sizeof(ArrowFire),
|
/**/ sizeof(ArrowFire),
|
||||||
(ActorFunc)ArrowFire_Init,
|
/**/ ArrowFire_Init,
|
||||||
(ActorFunc)ArrowFire_Destroy,
|
/**/ ArrowFire_Destroy,
|
||||||
(ActorFunc)ArrowFire_Update,
|
/**/ ArrowFire_Update,
|
||||||
(ActorFunc)ArrowFire_Draw,
|
/**/ ArrowFire_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
static InitChainEntry sInitChain[] = {
|
static InitChainEntry sInitChain[] = {
|
||||||
|
@ -200,50 +200,54 @@ void ArrowFire_Draw(Actor* thisx, PlayState* play2) {
|
||||||
|
|
||||||
stateFrames = play->state.frames;
|
stateFrames = play->state.frames;
|
||||||
arrow = (EnArrow*)this->actor.parent;
|
arrow = (EnArrow*)this->actor.parent;
|
||||||
if (1) {}
|
|
||||||
|
|
||||||
if ((arrow != NULL) && (arrow->actor.update != NULL) && (this->timer < 255)) {
|
if ((arrow == NULL) || (arrow->actor.update == NULL)) {
|
||||||
if (1) {}
|
return;
|
||||||
transform = (arrow->hitFlags & 2) ? &this->actor : &arrow->actor;
|
|
||||||
|
|
||||||
OPEN_DISPS(play->state.gfxCtx, "../z_arrow_fire.c", 618);
|
|
||||||
|
|
||||||
Matrix_Translate(transform->world.pos.x, transform->world.pos.y, transform->world.pos.z, MTXMODE_NEW);
|
|
||||||
Matrix_RotateY(BINANG_TO_RAD(transform->shape.rot.y), MTXMODE_APPLY);
|
|
||||||
Matrix_RotateX(BINANG_TO_RAD(transform->shape.rot.x), MTXMODE_APPLY);
|
|
||||||
Matrix_RotateZ(BINANG_TO_RAD(transform->shape.rot.z), MTXMODE_APPLY);
|
|
||||||
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
|
|
||||||
|
|
||||||
// Draw red effect over the screen when arrow hits
|
|
||||||
if (this->unk_15C > 0) {
|
|
||||||
POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP);
|
|
||||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, (s32)(40.0f * this->unk_15C) & 0xFF, 0, 0,
|
|
||||||
(s32)(150.0f * this->unk_15C) & 0xFF);
|
|
||||||
gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE);
|
|
||||||
gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE);
|
|
||||||
gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Draw fire on the arrow
|
|
||||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
|
||||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 200, 0, this->alpha);
|
|
||||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 128);
|
|
||||||
Matrix_RotateZYX(0x4000, 0x0, 0x0, MTXMODE_APPLY);
|
|
||||||
if (this->timer != 0) {
|
|
||||||
Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
|
||||||
} else {
|
|
||||||
Matrix_Translate(0.0f, 1500.0f, 0.0f, MTXMODE_APPLY);
|
|
||||||
}
|
|
||||||
Matrix_Scale(this->radius * 0.2f, this->unk_158 * 4.0f, this->radius * 0.2f, MTXMODE_APPLY);
|
|
||||||
Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY);
|
|
||||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_arrow_fire.c", 666),
|
|
||||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
|
||||||
gSPDisplayList(POLY_XLU_DISP++, sMaterialDL);
|
|
||||||
gSPDisplayList(POLY_XLU_DISP++,
|
|
||||||
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 255 - (stateFrames * 2) % 256, 0, 64, 32,
|
|
||||||
1, 255 - stateFrames % 256, 511 - (stateFrames * 10) % 512, 64, 64));
|
|
||||||
gSPDisplayList(POLY_XLU_DISP++, sModelDL);
|
|
||||||
|
|
||||||
CLOSE_DISPS(play->state.gfxCtx, "../z_arrow_fire.c", 682);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this->timer >= 255) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
transform = (arrow->hitFlags & 2) ? &this->actor : &arrow->actor;
|
||||||
|
|
||||||
|
OPEN_DISPS(play->state.gfxCtx, "../z_arrow_fire.c", 618);
|
||||||
|
|
||||||
|
Matrix_Translate(transform->world.pos.x, transform->world.pos.y, transform->world.pos.z, MTXMODE_NEW);
|
||||||
|
Matrix_RotateY(BINANG_TO_RAD(transform->shape.rot.y), MTXMODE_APPLY);
|
||||||
|
Matrix_RotateX(BINANG_TO_RAD(transform->shape.rot.x), MTXMODE_APPLY);
|
||||||
|
Matrix_RotateZ(BINANG_TO_RAD(transform->shape.rot.z), MTXMODE_APPLY);
|
||||||
|
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
|
||||||
|
|
||||||
|
// Draw red effect over the screen when arrow hits
|
||||||
|
if (this->unk_15C > 0) {
|
||||||
|
POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP);
|
||||||
|
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, (s32)(40.0f * this->unk_15C) & 0xFF, 0, 0,
|
||||||
|
(s32)(150.0f * this->unk_15C) & 0xFF);
|
||||||
|
gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE);
|
||||||
|
gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE);
|
||||||
|
gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw fire on the arrow
|
||||||
|
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||||
|
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 200, 0, this->alpha);
|
||||||
|
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 128);
|
||||||
|
Matrix_RotateZYX(0x4000, 0x0, 0x0, MTXMODE_APPLY);
|
||||||
|
if (this->timer != 0) {
|
||||||
|
Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||||
|
} else {
|
||||||
|
Matrix_Translate(0.0f, 1500.0f, 0.0f, MTXMODE_APPLY);
|
||||||
|
}
|
||||||
|
Matrix_Scale(this->radius * 0.2f, this->unk_158 * 4.0f, this->radius * 0.2f, MTXMODE_APPLY);
|
||||||
|
Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY);
|
||||||
|
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_arrow_fire.c", 666),
|
||||||
|
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
|
gSPDisplayList(POLY_XLU_DISP++, sMaterialDL);
|
||||||
|
gSPDisplayList(POLY_XLU_DISP++,
|
||||||
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 255 - (stateFrames * 2) % 256, 0, 64, 32, 1,
|
||||||
|
255 - stateFrames % 256, 511 - (stateFrames * 10) % 512, 64, 64));
|
||||||
|
gSPDisplayList(POLY_XLU_DISP++, sModelDL);
|
||||||
|
|
||||||
|
CLOSE_DISPS(play->state.gfxCtx, "../z_arrow_fire.c", 682);
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,15 +22,15 @@ void ArrowIce_Hit(ArrowIce* this, PlayState* play);
|
||||||
#include "assets/overlays/ovl_Arrow_Ice/ovl_Arrow_Ice.c"
|
#include "assets/overlays/ovl_Arrow_Ice/ovl_Arrow_Ice.c"
|
||||||
|
|
||||||
ActorInit Arrow_Ice_InitVars = {
|
ActorInit Arrow_Ice_InitVars = {
|
||||||
ACTOR_ARROW_ICE,
|
/**/ ACTOR_ARROW_ICE,
|
||||||
ACTORCAT_ITEMACTION,
|
/**/ ACTORCAT_ITEMACTION,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_GAMEPLAY_KEEP,
|
/**/ OBJECT_GAMEPLAY_KEEP,
|
||||||
sizeof(ArrowIce),
|
/**/ sizeof(ArrowIce),
|
||||||
(ActorFunc)ArrowIce_Init,
|
/**/ ArrowIce_Init,
|
||||||
(ActorFunc)ArrowIce_Destroy,
|
/**/ ArrowIce_Destroy,
|
||||||
(ActorFunc)ArrowIce_Update,
|
/**/ ArrowIce_Update,
|
||||||
(ActorFunc)ArrowIce_Draw,
|
/**/ ArrowIce_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
static InitChainEntry sInitChain[] = {
|
static InitChainEntry sInitChain[] = {
|
||||||
|
@ -199,50 +199,53 @@ void ArrowIce_Draw(Actor* thisx, PlayState* play) {
|
||||||
u32 stateFrames = play->state.frames;
|
u32 stateFrames = play->state.frames;
|
||||||
EnArrow* arrow = (EnArrow*)this->actor.parent;
|
EnArrow* arrow = (EnArrow*)this->actor.parent;
|
||||||
|
|
||||||
if (1) {}
|
if ((arrow == NULL) || (arrow->actor.update == NULL)) {
|
||||||
|
return;
|
||||||
if ((arrow != NULL) && (arrow->actor.update != NULL) && (this->timer < 255)) {
|
|
||||||
if (1) {}
|
|
||||||
transform = (arrow->hitFlags & 2) ? &this->actor : &arrow->actor;
|
|
||||||
|
|
||||||
OPEN_DISPS(play->state.gfxCtx, "../z_arrow_ice.c", 610);
|
|
||||||
|
|
||||||
Matrix_Translate(transform->world.pos.x, transform->world.pos.y, transform->world.pos.z, MTXMODE_NEW);
|
|
||||||
Matrix_RotateY(BINANG_TO_RAD(transform->shape.rot.y), MTXMODE_APPLY);
|
|
||||||
Matrix_RotateX(BINANG_TO_RAD(transform->shape.rot.x), MTXMODE_APPLY);
|
|
||||||
Matrix_RotateZ(BINANG_TO_RAD(transform->shape.rot.z), MTXMODE_APPLY);
|
|
||||||
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
|
|
||||||
|
|
||||||
// Draw blue effect over the screen when arrow hits
|
|
||||||
if (this->unk_164 > 0) {
|
|
||||||
POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP);
|
|
||||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 0, (s32)(10.0f * this->unk_164) & 0xFF,
|
|
||||||
(s32)(50.0f * this->unk_164) & 0xFF, (s32)(150.0f * this->unk_164) & 0xFF);
|
|
||||||
gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE);
|
|
||||||
gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE);
|
|
||||||
gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Draw ice on the arrow
|
|
||||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
|
||||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 170, 255, 255, this->alpha);
|
|
||||||
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 255, 128);
|
|
||||||
Matrix_RotateZYX(0x4000, 0x0, 0x0, MTXMODE_APPLY);
|
|
||||||
if (this->timer != 0) {
|
|
||||||
Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
|
||||||
} else {
|
|
||||||
Matrix_Translate(0.0f, 1500.0f, 0.0f, MTXMODE_APPLY);
|
|
||||||
}
|
|
||||||
Matrix_Scale(this->radius * 0.2f, this->unk_160 * 3.0f, this->radius * 0.2f, MTXMODE_APPLY);
|
|
||||||
Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY);
|
|
||||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_arrow_ice.c", 660),
|
|
||||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
|
||||||
gSPDisplayList(POLY_XLU_DISP++, sMaterialDL);
|
|
||||||
gSPDisplayList(POLY_XLU_DISP++,
|
|
||||||
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 511 - (stateFrames * 5) % 512, 0, 128, 32,
|
|
||||||
1, 511 - (stateFrames * 10) % 512, 511 - (stateFrames * 10) % 512, 4, 16));
|
|
||||||
gSPDisplayList(POLY_XLU_DISP++, sModelDL);
|
|
||||||
|
|
||||||
CLOSE_DISPS(play->state.gfxCtx, "../z_arrow_ice.c", 676);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this->timer >= 255) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
transform = (arrow->hitFlags & 2) ? &this->actor : &arrow->actor;
|
||||||
|
|
||||||
|
OPEN_DISPS(play->state.gfxCtx, "../z_arrow_ice.c", 610);
|
||||||
|
|
||||||
|
Matrix_Translate(transform->world.pos.x, transform->world.pos.y, transform->world.pos.z, MTXMODE_NEW);
|
||||||
|
Matrix_RotateY(BINANG_TO_RAD(transform->shape.rot.y), MTXMODE_APPLY);
|
||||||
|
Matrix_RotateX(BINANG_TO_RAD(transform->shape.rot.x), MTXMODE_APPLY);
|
||||||
|
Matrix_RotateZ(BINANG_TO_RAD(transform->shape.rot.z), MTXMODE_APPLY);
|
||||||
|
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
|
||||||
|
|
||||||
|
// Draw blue effect over the screen when arrow hits
|
||||||
|
if (this->unk_164 > 0) {
|
||||||
|
POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP);
|
||||||
|
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 0, (s32)(10.0f * this->unk_164) & 0xFF,
|
||||||
|
(s32)(50.0f * this->unk_164) & 0xFF, (s32)(150.0f * this->unk_164) & 0xFF);
|
||||||
|
gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE);
|
||||||
|
gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE);
|
||||||
|
gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw ice on the arrow
|
||||||
|
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||||
|
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 170, 255, 255, this->alpha);
|
||||||
|
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 255, 128);
|
||||||
|
Matrix_RotateZYX(0x4000, 0x0, 0x0, MTXMODE_APPLY);
|
||||||
|
if (this->timer != 0) {
|
||||||
|
Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||||
|
} else {
|
||||||
|
Matrix_Translate(0.0f, 1500.0f, 0.0f, MTXMODE_APPLY);
|
||||||
|
}
|
||||||
|
Matrix_Scale(this->radius * 0.2f, this->unk_160 * 3.0f, this->radius * 0.2f, MTXMODE_APPLY);
|
||||||
|
Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY);
|
||||||
|
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_arrow_ice.c", 660),
|
||||||
|
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
|
gSPDisplayList(POLY_XLU_DISP++, sMaterialDL);
|
||||||
|
gSPDisplayList(POLY_XLU_DISP++,
|
||||||
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 511 - (stateFrames * 5) % 512, 0, 128, 32, 1,
|
||||||
|
511 - (stateFrames * 10) % 512, 511 - (stateFrames * 10) % 512, 4, 16));
|
||||||
|
gSPDisplayList(POLY_XLU_DISP++, sModelDL);
|
||||||
|
|
||||||
|
CLOSE_DISPS(play->state.gfxCtx, "../z_arrow_ice.c", 676);
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,15 +22,15 @@ void ArrowLight_Hit(ArrowLight* this, PlayState* play);
|
||||||
#include "assets/overlays/ovl_Arrow_Light/ovl_Arrow_Light.c"
|
#include "assets/overlays/ovl_Arrow_Light/ovl_Arrow_Light.c"
|
||||||
|
|
||||||
ActorInit Arrow_Light_InitVars = {
|
ActorInit Arrow_Light_InitVars = {
|
||||||
ACTOR_ARROW_LIGHT,
|
/**/ ACTOR_ARROW_LIGHT,
|
||||||
ACTORCAT_ITEMACTION,
|
/**/ ACTORCAT_ITEMACTION,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_GAMEPLAY_KEEP,
|
/**/ OBJECT_GAMEPLAY_KEEP,
|
||||||
sizeof(ArrowLight),
|
/**/ sizeof(ArrowLight),
|
||||||
(ActorFunc)ArrowLight_Init,
|
/**/ ArrowLight_Init,
|
||||||
(ActorFunc)ArrowLight_Destroy,
|
/**/ ArrowLight_Destroy,
|
||||||
(ActorFunc)ArrowLight_Update,
|
/**/ ArrowLight_Update,
|
||||||
(ActorFunc)ArrowLight_Draw,
|
/**/ ArrowLight_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
static InitChainEntry sInitChain[] = {
|
static InitChainEntry sInitChain[] = {
|
||||||
|
@ -197,50 +197,53 @@ void ArrowLight_Draw(Actor* thisx, PlayState* play) {
|
||||||
EnArrow* arrow = (EnArrow*)this->actor.parent;
|
EnArrow* arrow = (EnArrow*)this->actor.parent;
|
||||||
Actor* transform;
|
Actor* transform;
|
||||||
|
|
||||||
if (1) {}
|
if ((arrow == NULL) || (arrow->actor.update == NULL)) {
|
||||||
|
return;
|
||||||
if ((arrow != NULL) && (arrow->actor.update != NULL) && (this->timer < 255)) {
|
|
||||||
if (1) {}
|
|
||||||
transform = (arrow->hitFlags & 2) ? &this->actor : &arrow->actor;
|
|
||||||
|
|
||||||
OPEN_DISPS(play->state.gfxCtx, "../z_arrow_light.c", 598);
|
|
||||||
|
|
||||||
Matrix_Translate(transform->world.pos.x, transform->world.pos.y, transform->world.pos.z, MTXMODE_NEW);
|
|
||||||
Matrix_RotateY(BINANG_TO_RAD(transform->shape.rot.y), MTXMODE_APPLY);
|
|
||||||
Matrix_RotateX(BINANG_TO_RAD(transform->shape.rot.x), MTXMODE_APPLY);
|
|
||||||
Matrix_RotateZ(BINANG_TO_RAD(transform->shape.rot.z), MTXMODE_APPLY);
|
|
||||||
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
|
|
||||||
|
|
||||||
// Draw yellow effect over the screen when arrow hits
|
|
||||||
if (this->unk_164 > 0) {
|
|
||||||
POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP);
|
|
||||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, (s32)(30.0f * this->unk_164) & 0xFF,
|
|
||||||
(s32)(40.0f * this->unk_164) & 0xFF, 0, (s32)(150.0f * this->unk_164) & 0xFF);
|
|
||||||
gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE);
|
|
||||||
gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE);
|
|
||||||
gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Draw light on the arrow
|
|
||||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
|
||||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 170, this->alpha);
|
|
||||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 0, 128);
|
|
||||||
Matrix_RotateZYX(0x4000, 0x0, 0x0, MTXMODE_APPLY);
|
|
||||||
if (this->timer != 0) {
|
|
||||||
Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
|
||||||
} else {
|
|
||||||
Matrix_Translate(0.0f, 1500.0f, 0.0f, MTXMODE_APPLY);
|
|
||||||
}
|
|
||||||
Matrix_Scale(this->radius * 0.2f, this->unk_160 * 4.0f, this->radius * 0.2f, MTXMODE_APPLY);
|
|
||||||
Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY);
|
|
||||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_arrow_light.c", 648),
|
|
||||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
|
||||||
gSPDisplayList(POLY_XLU_DISP++, sMaterialDL);
|
|
||||||
gSPDisplayList(POLY_XLU_DISP++,
|
|
||||||
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 511 - (stateFrames * 5) % 512, 0, 4, 32, 1,
|
|
||||||
511 - (stateFrames * 10) % 512, 511 - (stateFrames * 30) % 512, 8, 16));
|
|
||||||
gSPDisplayList(POLY_XLU_DISP++, sModelDL);
|
|
||||||
|
|
||||||
CLOSE_DISPS(play->state.gfxCtx, "../z_arrow_light.c", 664);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this->timer >= 255) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
transform = (arrow->hitFlags & 2) ? &this->actor : &arrow->actor;
|
||||||
|
|
||||||
|
OPEN_DISPS(play->state.gfxCtx, "../z_arrow_light.c", 598);
|
||||||
|
|
||||||
|
Matrix_Translate(transform->world.pos.x, transform->world.pos.y, transform->world.pos.z, MTXMODE_NEW);
|
||||||
|
Matrix_RotateY(BINANG_TO_RAD(transform->shape.rot.y), MTXMODE_APPLY);
|
||||||
|
Matrix_RotateX(BINANG_TO_RAD(transform->shape.rot.x), MTXMODE_APPLY);
|
||||||
|
Matrix_RotateZ(BINANG_TO_RAD(transform->shape.rot.z), MTXMODE_APPLY);
|
||||||
|
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
|
||||||
|
|
||||||
|
// Draw yellow effect over the screen when arrow hits
|
||||||
|
if (this->unk_164 > 0) {
|
||||||
|
POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP);
|
||||||
|
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, (s32)(30.0f * this->unk_164) & 0xFF, (s32)(40.0f * this->unk_164) & 0xFF,
|
||||||
|
0, (s32)(150.0f * this->unk_164) & 0xFF);
|
||||||
|
gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE);
|
||||||
|
gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE);
|
||||||
|
gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw light on the arrow
|
||||||
|
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||||
|
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 170, this->alpha);
|
||||||
|
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 0, 128);
|
||||||
|
Matrix_RotateZYX(0x4000, 0x0, 0x0, MTXMODE_APPLY);
|
||||||
|
if (this->timer != 0) {
|
||||||
|
Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||||
|
} else {
|
||||||
|
Matrix_Translate(0.0f, 1500.0f, 0.0f, MTXMODE_APPLY);
|
||||||
|
}
|
||||||
|
Matrix_Scale(this->radius * 0.2f, this->unk_160 * 4.0f, this->radius * 0.2f, MTXMODE_APPLY);
|
||||||
|
Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY);
|
||||||
|
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_arrow_light.c", 648),
|
||||||
|
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
|
gSPDisplayList(POLY_XLU_DISP++, sMaterialDL);
|
||||||
|
gSPDisplayList(POLY_XLU_DISP++,
|
||||||
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 511 - (stateFrames * 5) % 512, 0, 4, 32, 1,
|
||||||
|
511 - (stateFrames * 10) % 512, 511 - (stateFrames * 30) % 512, 8, 16));
|
||||||
|
gSPDisplayList(POLY_XLU_DISP++, sModelDL);
|
||||||
|
|
||||||
|
CLOSE_DISPS(play->state.gfxCtx, "../z_arrow_light.c", 664);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,15 +33,15 @@ void func_8086CB10(BgBdanObjects* this, PlayState* play);
|
||||||
void func_8086CB8C(BgBdanObjects* this, PlayState* play);
|
void func_8086CB8C(BgBdanObjects* this, PlayState* play);
|
||||||
|
|
||||||
ActorInit Bg_Bdan_Objects_InitVars = {
|
ActorInit Bg_Bdan_Objects_InitVars = {
|
||||||
ACTOR_BG_BDAN_OBJECTS,
|
/**/ ACTOR_BG_BDAN_OBJECTS,
|
||||||
ACTORCAT_BG,
|
/**/ ACTORCAT_BG,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_BDAN_OBJECTS,
|
/**/ OBJECT_BDAN_OBJECTS,
|
||||||
sizeof(BgBdanObjects),
|
/**/ sizeof(BgBdanObjects),
|
||||||
(ActorFunc)BgBdanObjects_Init,
|
/**/ BgBdanObjects_Init,
|
||||||
(ActorFunc)BgBdanObjects_Destroy,
|
/**/ BgBdanObjects_Destroy,
|
||||||
(ActorFunc)BgBdanObjects_Update,
|
/**/ BgBdanObjects_Update,
|
||||||
(ActorFunc)BgBdanObjects_Draw,
|
/**/ BgBdanObjects_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColliderCylinderInit sCylinderInit = {
|
static ColliderCylinderInit sCylinderInit = {
|
||||||
|
|
|
@ -43,15 +43,15 @@ void func_8086DDA8(BgBdanSwitch* this);
|
||||||
void func_8086DDC0(BgBdanSwitch* this, PlayState* play);
|
void func_8086DDC0(BgBdanSwitch* this, PlayState* play);
|
||||||
|
|
||||||
ActorInit Bg_Bdan_Switch_InitVars = {
|
ActorInit Bg_Bdan_Switch_InitVars = {
|
||||||
ACTOR_BG_BDAN_SWITCH,
|
/**/ ACTOR_BG_BDAN_SWITCH,
|
||||||
ACTORCAT_SWITCH,
|
/**/ ACTORCAT_SWITCH,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_BDAN_OBJECTS,
|
/**/ OBJECT_BDAN_OBJECTS,
|
||||||
sizeof(BgBdanSwitch),
|
/**/ sizeof(BgBdanSwitch),
|
||||||
(ActorFunc)BgBdanSwitch_Init,
|
/**/ BgBdanSwitch_Init,
|
||||||
(ActorFunc)BgBdanSwitch_Destroy,
|
/**/ BgBdanSwitch_Destroy,
|
||||||
(ActorFunc)BgBdanSwitch_Update,
|
/**/ BgBdanSwitch_Update,
|
||||||
(ActorFunc)BgBdanSwitch_Draw,
|
/**/ BgBdanSwitch_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColliderJntSphElementInit sJntSphElementsInit[] = {
|
static ColliderJntSphElementInit sJntSphElementsInit[] = {
|
||||||
|
|
|
@ -18,15 +18,15 @@ void BgBomGuard_Update(Actor* thisx, PlayState* play);
|
||||||
void func_8086E638(BgBomGuard* this, PlayState* play);
|
void func_8086E638(BgBomGuard* this, PlayState* play);
|
||||||
|
|
||||||
ActorInit Bg_Bom_Guard_InitVars = {
|
ActorInit Bg_Bom_Guard_InitVars = {
|
||||||
ACTOR_BG_BOM_GUARD,
|
/**/ ACTOR_BG_BOM_GUARD,
|
||||||
ACTORCAT_PROP,
|
/**/ ACTORCAT_PROP,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_BOWL,
|
/**/ OBJECT_BOWL,
|
||||||
sizeof(BgBomGuard),
|
/**/ sizeof(BgBomGuard),
|
||||||
(ActorFunc)BgBomGuard_Init,
|
/**/ BgBomGuard_Init,
|
||||||
(ActorFunc)BgBomGuard_Destroy,
|
/**/ BgBomGuard_Destroy,
|
||||||
(ActorFunc)BgBomGuard_Update,
|
/**/ BgBomGuard_Update,
|
||||||
NULL,
|
/**/ NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
void BgBomGuard_SetupAction(BgBomGuard* this, BgBomGuardActionFunc actionFunc) {
|
void BgBomGuard_SetupAction(BgBomGuard* this, BgBomGuardActionFunc actionFunc) {
|
||||||
|
|
|
@ -70,15 +70,15 @@ static ColliderTrisInit sTrisInit = {
|
||||||
};
|
};
|
||||||
|
|
||||||
ActorInit Bg_Bombwall_InitVars = {
|
ActorInit Bg_Bombwall_InitVars = {
|
||||||
ACTOR_BG_BOMBWALL,
|
/**/ ACTOR_BG_BOMBWALL,
|
||||||
ACTORCAT_BG,
|
/**/ ACTORCAT_BG,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_GAMEPLAY_FIELD_KEEP,
|
/**/ OBJECT_GAMEPLAY_FIELD_KEEP,
|
||||||
sizeof(BgBombwall),
|
/**/ sizeof(BgBombwall),
|
||||||
(ActorFunc)BgBombwall_Init,
|
/**/ BgBombwall_Init,
|
||||||
(ActorFunc)BgBombwall_Destroy,
|
/**/ BgBombwall_Destroy,
|
||||||
(ActorFunc)BgBombwall_Update,
|
/**/ BgBombwall_Update,
|
||||||
(ActorFunc)BgBombwall_Draw,
|
/**/ BgBombwall_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
void BgBombwall_InitDynapoly(BgBombwall* this, PlayState* play) {
|
void BgBombwall_InitDynapoly(BgBombwall* this, PlayState* play) {
|
||||||
|
|
|
@ -25,15 +25,15 @@ void BgBowlWall_FinishFall(BgBowlWall* this, PlayState* play);
|
||||||
void BgBowlWall_Reset(BgBowlWall* this, PlayState* play);
|
void BgBowlWall_Reset(BgBowlWall* this, PlayState* play);
|
||||||
|
|
||||||
ActorInit Bg_Bowl_Wall_InitVars = {
|
ActorInit Bg_Bowl_Wall_InitVars = {
|
||||||
ACTOR_BG_BOWL_WALL,
|
/**/ ACTOR_BG_BOWL_WALL,
|
||||||
ACTORCAT_PROP,
|
/**/ ACTORCAT_PROP,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_BOWL,
|
/**/ OBJECT_BOWL,
|
||||||
sizeof(BgBowlWall),
|
/**/ sizeof(BgBowlWall),
|
||||||
(ActorFunc)BgBowlWall_Init,
|
/**/ BgBowlWall_Init,
|
||||||
(ActorFunc)BgBowlWall_Destroy,
|
/**/ BgBowlWall_Destroy,
|
||||||
(ActorFunc)BgBowlWall_Update,
|
/**/ BgBowlWall_Update,
|
||||||
(ActorFunc)BgBowlWall_Draw,
|
/**/ BgBowlWall_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
static Vec3f sBullseyeOffset[] = {
|
static Vec3f sBullseyeOffset[] = {
|
||||||
|
|
|
@ -27,15 +27,15 @@ void BgBreakwall_Wait(BgBreakwall* this, PlayState* play);
|
||||||
void BgBreakwall_LavaCoverMove(BgBreakwall* this, PlayState* play);
|
void BgBreakwall_LavaCoverMove(BgBreakwall* this, PlayState* play);
|
||||||
|
|
||||||
ActorInit Bg_Breakwall_InitVars = {
|
ActorInit Bg_Breakwall_InitVars = {
|
||||||
ACTOR_BG_BREAKWALL,
|
/**/ ACTOR_BG_BREAKWALL,
|
||||||
ACTORCAT_BG,
|
/**/ ACTORCAT_BG,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_GAMEPLAY_KEEP,
|
/**/ OBJECT_GAMEPLAY_KEEP,
|
||||||
sizeof(BgBreakwall),
|
/**/ sizeof(BgBreakwall),
|
||||||
(ActorFunc)BgBreakwall_Init,
|
/**/ BgBreakwall_Init,
|
||||||
(ActorFunc)BgBreakwall_Destroy,
|
/**/ BgBreakwall_Destroy,
|
||||||
(ActorFunc)BgBreakwall_Update,
|
/**/ BgBreakwall_Update,
|
||||||
NULL,
|
/**/ NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColliderQuadInit sQuadInit = {
|
static ColliderQuadInit sQuadInit = {
|
||||||
|
@ -254,7 +254,7 @@ void BgBreakwall_Wait(BgBreakwall* this, PlayState* play) {
|
||||||
gSaveContext.cutsceneTrigger = 1;
|
gSaveContext.cutsceneTrigger = 1;
|
||||||
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||||
func_8002DF54(play, NULL, PLAYER_CSMODE_49);
|
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_49);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->dyna.actor.params < 0) {
|
if (this->dyna.actor.params < 0) {
|
||||||
|
|
|
@ -18,15 +18,15 @@ void BgDdanJd_Idle(BgDdanJd* this, PlayState* play);
|
||||||
void BgDdanJd_Move(BgDdanJd* this, PlayState* play);
|
void BgDdanJd_Move(BgDdanJd* this, PlayState* play);
|
||||||
|
|
||||||
ActorInit Bg_Ddan_Jd_InitVars = {
|
ActorInit Bg_Ddan_Jd_InitVars = {
|
||||||
ACTOR_BG_DDAN_JD,
|
/**/ ACTOR_BG_DDAN_JD,
|
||||||
ACTORCAT_BG,
|
/**/ ACTORCAT_BG,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_DDAN_OBJECTS,
|
/**/ OBJECT_DDAN_OBJECTS,
|
||||||
sizeof(BgDdanJd),
|
/**/ sizeof(BgDdanJd),
|
||||||
(ActorFunc)BgDdanJd_Init,
|
/**/ BgDdanJd_Init,
|
||||||
(ActorFunc)BgDdanJd_Destroy,
|
/**/ BgDdanJd_Destroy,
|
||||||
(ActorFunc)BgDdanJd_Update,
|
/**/ BgDdanJd_Update,
|
||||||
(ActorFunc)BgDdanJd_Draw,
|
/**/ BgDdanJd_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
static InitChainEntry sInitChain[] = {
|
static InitChainEntry sInitChain[] = {
|
||||||
|
|
|
@ -19,15 +19,15 @@ void BgDdanKd_LowerStairs(BgDdanKd* this, PlayState* play);
|
||||||
void BgDdanKd_DoNothing(BgDdanKd* this, PlayState* play);
|
void BgDdanKd_DoNothing(BgDdanKd* this, PlayState* play);
|
||||||
|
|
||||||
ActorInit Bg_Ddan_Kd_InitVars = {
|
ActorInit Bg_Ddan_Kd_InitVars = {
|
||||||
ACTOR_BG_DDAN_KD,
|
/**/ ACTOR_BG_DDAN_KD,
|
||||||
ACTORCAT_BG,
|
/**/ ACTORCAT_BG,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_DDAN_OBJECTS,
|
/**/ OBJECT_DDAN_OBJECTS,
|
||||||
sizeof(BgDdanKd),
|
/**/ sizeof(BgDdanKd),
|
||||||
(ActorFunc)BgDdanKd_Init,
|
/**/ BgDdanKd_Init,
|
||||||
(ActorFunc)BgDdanKd_Destroy,
|
/**/ BgDdanKd_Destroy,
|
||||||
(ActorFunc)BgDdanKd_Update,
|
/**/ BgDdanKd_Update,
|
||||||
(ActorFunc)BgDdanKd_Draw,
|
/**/ BgDdanKd_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColliderCylinderInit sCylinderInit = {
|
static ColliderCylinderInit sCylinderInit = {
|
||||||
|
|
|
@ -21,15 +21,15 @@ void BgDodoago_DoNothing(BgDodoago* this, PlayState* play);
|
||||||
void BgDodoago_LightOneEye(BgDodoago* this, PlayState* play);
|
void BgDodoago_LightOneEye(BgDodoago* this, PlayState* play);
|
||||||
|
|
||||||
ActorInit Bg_Dodoago_InitVars = {
|
ActorInit Bg_Dodoago_InitVars = {
|
||||||
ACTOR_BG_DODOAGO,
|
/**/ ACTOR_BG_DODOAGO,
|
||||||
ACTORCAT_BG,
|
/**/ ACTORCAT_BG,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_DDAN_OBJECTS,
|
/**/ OBJECT_DDAN_OBJECTS,
|
||||||
sizeof(BgDodoago),
|
/**/ sizeof(BgDodoago),
|
||||||
(ActorFunc)BgDodoago_Init,
|
/**/ BgDodoago_Init,
|
||||||
(ActorFunc)BgDodoago_Destroy,
|
/**/ BgDodoago_Destroy,
|
||||||
(ActorFunc)BgDodoago_Update,
|
/**/ BgDodoago_Update,
|
||||||
(ActorFunc)BgDodoago_Draw,
|
/**/ BgDodoago_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColliderCylinderInit sColCylinderInitMain = {
|
static ColliderCylinderInit sColCylinderInitMain = {
|
||||||
|
|
|
@ -55,15 +55,15 @@ void BgDyYoseizo_DrawEffects(BgDyYoseizo* this, PlayState* play);
|
||||||
static s32 sUnusedGetItemIds[] = { GI_FARORES_WIND, GI_NAYRUS_LOVE, GI_DINS_FIRE };
|
static s32 sUnusedGetItemIds[] = { GI_FARORES_WIND, GI_NAYRUS_LOVE, GI_DINS_FIRE };
|
||||||
|
|
||||||
ActorInit Bg_Dy_Yoseizo_InitVars = {
|
ActorInit Bg_Dy_Yoseizo_InitVars = {
|
||||||
ACTOR_BG_DY_YOSEIZO,
|
/**/ ACTOR_BG_DY_YOSEIZO,
|
||||||
ACTORCAT_PROP,
|
/**/ ACTORCAT_PROP,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_DY_OBJ,
|
/**/ OBJECT_DY_OBJ,
|
||||||
sizeof(BgDyYoseizo),
|
/**/ sizeof(BgDyYoseizo),
|
||||||
(ActorFunc)BgDyYoseizo_Init,
|
/**/ BgDyYoseizo_Init,
|
||||||
(ActorFunc)BgDyYoseizo_Destroy,
|
/**/ BgDyYoseizo_Destroy,
|
||||||
(ActorFunc)BgDyYoseizo_Update,
|
/**/ BgDyYoseizo_Update,
|
||||||
NULL,
|
/**/ NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
void BgDyYoseizo_Init(Actor* thisx, PlayState* play2) {
|
void BgDyYoseizo_Init(Actor* thisx, PlayState* play2) {
|
||||||
|
@ -191,7 +191,7 @@ void BgDyYoseizo_CheckMagicAcquired(BgDyYoseizo* this, PlayState* play) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
func_8002DF54(play, &this->actor, PLAYER_CSMODE_1);
|
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1);
|
||||||
this->actionFunc = BgDyYoseizo_ChooseType;
|
this->actionFunc = BgDyYoseizo_ChooseType;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -199,7 +199,7 @@ void BgDyYoseizo_CheckMagicAcquired(BgDyYoseizo* this, PlayState* play) {
|
||||||
void BgDyYoseizo_ChooseType(BgDyYoseizo* this, PlayState* play) {
|
void BgDyYoseizo_ChooseType(BgDyYoseizo* this, PlayState* play) {
|
||||||
s32 givingReward;
|
s32 givingReward;
|
||||||
|
|
||||||
func_8002DF54(play, &this->actor, PLAYER_CSMODE_1);
|
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1);
|
||||||
// "Mode"
|
// "Mode"
|
||||||
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ もうど ☆☆☆☆☆ %d\n" VT_RST, play->msgCtx.ocarinaMode);
|
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ もうど ☆☆☆☆☆ %d\n" VT_RST, play->msgCtx.ocarinaMode);
|
||||||
givingReward = false;
|
givingReward = false;
|
||||||
|
@ -315,12 +315,12 @@ void BgDyYoseizo_SetupSpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Actor_PlaySfx(&this->actor, NA_SE_VO_FR_LAUGH_0);
|
Actor_PlaySfx(&this->actor, NA_SE_VO_FR_LAUGH_0);
|
||||||
func_8002DF54(play, &this->actor, PLAYER_CSMODE_1);
|
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1);
|
||||||
this->actionFunc = BgDyYoseizo_SpinGrow_NoReward;
|
this->actionFunc = BgDyYoseizo_SpinGrow_NoReward;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BgDyYoseizo_SpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) {
|
void BgDyYoseizo_SpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) {
|
||||||
func_8002DF54(play, &this->actor, PLAYER_CSMODE_1);
|
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1);
|
||||||
Math_ApproachF(&this->actor.world.pos.y, this->grownHeight, this->heightFraction, 100.0f);
|
Math_ApproachF(&this->actor.world.pos.y, this->grownHeight, this->heightFraction, 100.0f);
|
||||||
Math_ApproachF(&this->scale, 0.035f, this->scaleFraction, 0.005f);
|
Math_ApproachF(&this->scale, 0.035f, this->scaleFraction, 0.005f);
|
||||||
Math_ApproachF(&this->heightFraction, 0.8f, 0.1f, 0.02f);
|
Math_ApproachF(&this->heightFraction, 0.8f, 0.1f, 0.02f);
|
||||||
|
@ -346,7 +346,7 @@ void BgDyYoseizo_SpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) {
|
||||||
void BgDyYoseizo_CompleteSpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) {
|
void BgDyYoseizo_CompleteSpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) {
|
||||||
f32 curFrame = this->skelAnime.curFrame;
|
f32 curFrame = this->skelAnime.curFrame;
|
||||||
|
|
||||||
func_8002DF54(play, &this->actor, PLAYER_CSMODE_1);
|
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1);
|
||||||
|
|
||||||
if ((this->frameCount * 1273.0f) <= this->bobTimer) {
|
if ((this->frameCount * 1273.0f) <= this->bobTimer) {
|
||||||
this->bobTimer = 0.0f;
|
this->bobTimer = 0.0f;
|
||||||
|
@ -360,7 +360,7 @@ void BgDyYoseizo_CompleteSpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void BgDyYoseizo_SetupGreetPlayer_NoReward(BgDyYoseizo* this, PlayState* play) {
|
void BgDyYoseizo_SetupGreetPlayer_NoReward(BgDyYoseizo* this, PlayState* play) {
|
||||||
func_8002DF54(play, &this->actor, PLAYER_CSMODE_1);
|
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1);
|
||||||
|
|
||||||
if (play->sceneId == SCENE_GREAT_FAIRYS_FOUNTAIN_MAGIC) {
|
if (play->sceneId == SCENE_GREAT_FAIRYS_FOUNTAIN_MAGIC) {
|
||||||
this->frameCount = Animation_GetLastFrame(&gGreatFairySittingAnim);
|
this->frameCount = Animation_GetLastFrame(&gGreatFairySittingAnim);
|
||||||
|
@ -380,7 +380,7 @@ void BgDyYoseizo_SetupGreetPlayer_NoReward(BgDyYoseizo* this, PlayState* play) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void BgDyYoseizo_GreetPlayer_NoReward(BgDyYoseizo* this, PlayState* play) {
|
void BgDyYoseizo_GreetPlayer_NoReward(BgDyYoseizo* this, PlayState* play) {
|
||||||
func_8002DF54(play, &this->actor, PLAYER_CSMODE_1);
|
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1);
|
||||||
this->bobTimer = this->skelAnime.curFrame * 1273.0f;
|
this->bobTimer = this->skelAnime.curFrame * 1273.0f;
|
||||||
|
|
||||||
if ((this->frameCount * 1273.0f) <= this->bobTimer) {
|
if ((this->frameCount * 1273.0f) <= this->bobTimer) {
|
||||||
|
@ -548,7 +548,7 @@ void BgDyYoseizo_Vanish(BgDyYoseizo* this, PlayState* play) {
|
||||||
Actor* findOcarinaSpot;
|
Actor* findOcarinaSpot;
|
||||||
|
|
||||||
if (this->vanishTimer == 0) {
|
if (this->vanishTimer == 0) {
|
||||||
func_8002DF54(play, &this->actor, PLAYER_CSMODE_7);
|
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7);
|
||||||
play->envCtx.lightSettingOverride = 0;
|
play->envCtx.lightSettingOverride = 0;
|
||||||
findOcarinaSpot = play->actorCtx.actorLists[ACTORCAT_PROP].head;
|
findOcarinaSpot = play->actorCtx.actorLists[ACTORCAT_PROP].head;
|
||||||
|
|
||||||
|
@ -570,7 +570,7 @@ void BgDyYoseizo_SetupSpinGrow_Reward(BgDyYoseizo* this, PlayState* play) {
|
||||||
if (play->csCtx.state != CS_STATE_IDLE) {
|
if (play->csCtx.state != CS_STATE_IDLE) {
|
||||||
if ((play->csCtx.actorCues[0] != NULL) && (play->csCtx.actorCues[0]->id == 2)) {
|
if ((play->csCtx.actorCues[0] != NULL) && (play->csCtx.actorCues[0]->id == 2)) {
|
||||||
this->actor.draw = BgDyYoseizo_Draw;
|
this->actor.draw = BgDyYoseizo_Draw;
|
||||||
func_8002DF54(play, &this->actor, PLAYER_CSMODE_1);
|
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1);
|
||||||
this->finishedSpinGrow = false;
|
this->finishedSpinGrow = false;
|
||||||
|
|
||||||
if (play->sceneId == SCENE_GREAT_FAIRYS_FOUNTAIN_MAGIC) {
|
if (play->sceneId == SCENE_GREAT_FAIRYS_FOUNTAIN_MAGIC) {
|
||||||
|
|
|
@ -26,15 +26,15 @@ void BgGanonOtyuka_Fall(BgGanonOtyuka* this, PlayState* play);
|
||||||
void BgGanonOtyuka_DoNothing(Actor* thisx, PlayState* play);
|
void BgGanonOtyuka_DoNothing(Actor* thisx, PlayState* play);
|
||||||
|
|
||||||
ActorInit Bg_Ganon_Otyuka_InitVars = {
|
ActorInit Bg_Ganon_Otyuka_InitVars = {
|
||||||
ACTOR_BG_GANON_OTYUKA,
|
/**/ ACTOR_BG_GANON_OTYUKA,
|
||||||
ACTORCAT_PROP,
|
/**/ ACTORCAT_PROP,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_GANON,
|
/**/ OBJECT_GANON,
|
||||||
sizeof(BgGanonOtyuka),
|
/**/ sizeof(BgGanonOtyuka),
|
||||||
(ActorFunc)BgGanonOtyuka_Init,
|
/**/ BgGanonOtyuka_Init,
|
||||||
(ActorFunc)BgGanonOtyuka_Destroy,
|
/**/ BgGanonOtyuka_Destroy,
|
||||||
(ActorFunc)BgGanonOtyuka_Update,
|
/**/ BgGanonOtyuka_Update,
|
||||||
(ActorFunc)BgGanonOtyuka_Draw,
|
/**/ BgGanonOtyuka_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
static InitChainEntry sInitChain[] = {
|
static InitChainEntry sInitChain[] = {
|
||||||
|
|
|
@ -21,15 +21,15 @@ void func_808783AC(BgGateShutter* this, PlayState* play);
|
||||||
void func_808783D4(BgGateShutter* this, PlayState* play);
|
void func_808783D4(BgGateShutter* this, PlayState* play);
|
||||||
|
|
||||||
ActorInit Bg_Gate_Shutter_InitVars = {
|
ActorInit Bg_Gate_Shutter_InitVars = {
|
||||||
ACTOR_BG_GATE_SHUTTER,
|
/**/ ACTOR_BG_GATE_SHUTTER,
|
||||||
ACTORCAT_ITEMACTION,
|
/**/ ACTORCAT_ITEMACTION,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_SPOT01_MATOYAB,
|
/**/ OBJECT_SPOT01_MATOYAB,
|
||||||
sizeof(BgGateShutter),
|
/**/ sizeof(BgGateShutter),
|
||||||
(ActorFunc)BgGateShutter_Init,
|
/**/ BgGateShutter_Init,
|
||||||
(ActorFunc)BgGateShutter_Destroy,
|
/**/ BgGateShutter_Destroy,
|
||||||
(ActorFunc)BgGateShutter_Update,
|
/**/ BgGateShutter_Update,
|
||||||
(ActorFunc)BgGateShutter_Draw,
|
/**/ BgGateShutter_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
void BgGateShutter_Init(Actor* thisx, PlayState* play) {
|
void BgGateShutter_Init(Actor* thisx, PlayState* play) {
|
||||||
|
|
|
@ -20,15 +20,15 @@ void BgGjyoBridge_TriggerCutscene(BgGjyoBridge* this, PlayState* play);
|
||||||
void BgGjyoBridge_SpawnBridge(BgGjyoBridge* this, PlayState* play);
|
void BgGjyoBridge_SpawnBridge(BgGjyoBridge* this, PlayState* play);
|
||||||
|
|
||||||
ActorInit Bg_Gjyo_Bridge_InitVars = {
|
ActorInit Bg_Gjyo_Bridge_InitVars = {
|
||||||
ACTOR_BG_GJYO_BRIDGE,
|
/**/ ACTOR_BG_GJYO_BRIDGE,
|
||||||
ACTORCAT_PROP,
|
/**/ ACTORCAT_PROP,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_GJYO_OBJECTS,
|
/**/ OBJECT_GJYO_OBJECTS,
|
||||||
sizeof(BgGjyoBridge),
|
/**/ sizeof(BgGjyoBridge),
|
||||||
(ActorFunc)BgGjyoBridge_Init,
|
/**/ BgGjyoBridge_Init,
|
||||||
(ActorFunc)BgGjyoBridge_Destroy,
|
/**/ BgGjyoBridge_Destroy,
|
||||||
(ActorFunc)BgGjyoBridge_Update,
|
/**/ BgGjyoBridge_Update,
|
||||||
(ActorFunc)BgGjyoBridge_Draw,
|
/**/ BgGjyoBridge_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
static InitChainEntry sInitChain[] = {
|
static InitChainEntry sInitChain[] = {
|
||||||
|
|
|
@ -22,15 +22,15 @@ void BgGndDarkmeiro_UpdateStaticBlock(BgGndDarkmeiro* this, PlayState* play);
|
||||||
void BgGndDarkmeiro_UpdateSwitchBlock(BgGndDarkmeiro* this, PlayState* play);
|
void BgGndDarkmeiro_UpdateSwitchBlock(BgGndDarkmeiro* this, PlayState* play);
|
||||||
|
|
||||||
ActorInit Bg_Gnd_Darkmeiro_InitVars = {
|
ActorInit Bg_Gnd_Darkmeiro_InitVars = {
|
||||||
ACTOR_BG_GND_DARKMEIRO,
|
/**/ ACTOR_BG_GND_DARKMEIRO,
|
||||||
ACTORCAT_PROP,
|
/**/ ACTORCAT_PROP,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_DEMO_KEKKAI,
|
/**/ OBJECT_DEMO_KEKKAI,
|
||||||
sizeof(BgGndDarkmeiro),
|
/**/ sizeof(BgGndDarkmeiro),
|
||||||
(ActorFunc)BgGndDarkmeiro_Init,
|
/**/ BgGndDarkmeiro_Init,
|
||||||
(ActorFunc)BgGndDarkmeiro_Destroy,
|
/**/ BgGndDarkmeiro_Destroy,
|
||||||
(ActorFunc)BgGndDarkmeiro_Update,
|
/**/ BgGndDarkmeiro_Update,
|
||||||
NULL,
|
/**/ NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
void BgGndDarkmeiro_ToggleBlock(BgGndDarkmeiro* this, PlayState* play) {
|
void BgGndDarkmeiro_ToggleBlock(BgGndDarkmeiro* this, PlayState* play) {
|
||||||
|
@ -100,10 +100,11 @@ void BgGndDarkmeiro_Destroy(Actor* thisx, PlayState* play2) {
|
||||||
PlayState* play = play2;
|
PlayState* play = play2;
|
||||||
BgGndDarkmeiro* this = (BgGndDarkmeiro*)thisx;
|
BgGndDarkmeiro* this = (BgGndDarkmeiro*)thisx;
|
||||||
|
|
||||||
if ((this->dyna.actor.params & 0xFF) == 1) {
|
if ((this->dyna.actor.params & 0xFF) != 1) {
|
||||||
if (1) {}
|
return;
|
||||||
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BgGndDarkmeiro_Noop(BgGndDarkmeiro* this, PlayState* play) {
|
void BgGndDarkmeiro_Noop(BgGndDarkmeiro* this, PlayState* play) {
|
||||||
|
|
|
@ -19,15 +19,15 @@ void BgGndFiremeiro_Shake(BgGndFiremeiro* this, PlayState* play);
|
||||||
void BgGndFiremeiro_Rise(BgGndFiremeiro* this, PlayState* play);
|
void BgGndFiremeiro_Rise(BgGndFiremeiro* this, PlayState* play);
|
||||||
|
|
||||||
ActorInit Bg_Gnd_Firemeiro_InitVars = {
|
ActorInit Bg_Gnd_Firemeiro_InitVars = {
|
||||||
ACTOR_BG_GND_FIREMEIRO,
|
/**/ ACTOR_BG_GND_FIREMEIRO,
|
||||||
ACTORCAT_PROP,
|
/**/ ACTORCAT_PROP,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_DEMO_KEKKAI,
|
/**/ OBJECT_DEMO_KEKKAI,
|
||||||
sizeof(BgGndFiremeiro),
|
/**/ sizeof(BgGndFiremeiro),
|
||||||
(ActorFunc)BgGndFiremeiro_Init,
|
/**/ BgGndFiremeiro_Init,
|
||||||
(ActorFunc)BgGndFiremeiro_Destroy,
|
/**/ BgGndFiremeiro_Destroy,
|
||||||
(ActorFunc)BgGndFiremeiro_Update,
|
/**/ BgGndFiremeiro_Update,
|
||||||
(ActorFunc)BgGndFiremeiro_Draw,
|
/**/ BgGndFiremeiro_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
void BgGndFiremeiro_Init(Actor* thisx, PlayState* play) {
|
void BgGndFiremeiro_Init(Actor* thisx, PlayState* play) {
|
||||||
|
@ -51,10 +51,11 @@ void BgGndFiremeiro_Destroy(Actor* thisx, PlayState* play2) {
|
||||||
PlayState* play = play2;
|
PlayState* play = play2;
|
||||||
BgGndFiremeiro* this = (BgGndFiremeiro*)thisx;
|
BgGndFiremeiro* this = (BgGndFiremeiro*)thisx;
|
||||||
|
|
||||||
if (this->dyna.actor.params == 0) {
|
if (this->dyna.actor.params != 0) {
|
||||||
if (1) {}
|
return;
|
||||||
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BgGndFiremeiro_Sink(BgGndFiremeiro* this, PlayState* play) {
|
void BgGndFiremeiro_Sink(BgGndFiremeiro* this, PlayState* play) {
|
||||||
|
|
|
@ -24,15 +24,15 @@ void BgGndIceblock_Idle(BgGndIceblock* this, PlayState* play);
|
||||||
void BgGndIceblock_Slide(BgGndIceblock* this, PlayState* play);
|
void BgGndIceblock_Slide(BgGndIceblock* this, PlayState* play);
|
||||||
|
|
||||||
ActorInit Bg_Gnd_Iceblock_InitVars = {
|
ActorInit Bg_Gnd_Iceblock_InitVars = {
|
||||||
ACTOR_BG_GND_ICEBLOCK,
|
/**/ ACTOR_BG_GND_ICEBLOCK,
|
||||||
ACTORCAT_PROP,
|
/**/ ACTORCAT_PROP,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_DEMO_KEKKAI,
|
/**/ OBJECT_DEMO_KEKKAI,
|
||||||
sizeof(BgGndIceblock),
|
/**/ sizeof(BgGndIceblock),
|
||||||
(ActorFunc)BgGndIceblock_Init,
|
/**/ BgGndIceblock_Init,
|
||||||
(ActorFunc)BgGndIceblock_Destroy,
|
/**/ BgGndIceblock_Destroy,
|
||||||
(ActorFunc)BgGndIceblock_Update,
|
/**/ BgGndIceblock_Update,
|
||||||
(ActorFunc)BgGndIceblock_Draw,
|
/**/ BgGndIceblock_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
static Color_RGBA8 sWhite = { 250, 250, 250, 255 };
|
static Color_RGBA8 sWhite = { 250, 250, 250, 255 };
|
||||||
|
@ -239,7 +239,7 @@ void BgGndIceblock_Idle(BgGndIceblock* this, PlayState* play) {
|
||||||
if (this->dyna.unk_150 > 0.0f) {
|
if (this->dyna.unk_150 > 0.0f) {
|
||||||
BgGndIceblock_SetNextPosition(this);
|
BgGndIceblock_SetNextPosition(this);
|
||||||
if (Actor_WorldDistXZToPoint(&this->dyna.actor, &this->targetPos) > 1.0f) {
|
if (Actor_WorldDistXZToPoint(&this->dyna.actor, &this->targetPos) > 1.0f) {
|
||||||
func_8002DF54(play, &this->dyna.actor, PLAYER_CSMODE_8);
|
Player_SetCsActionWithHaltedActors(play, &this->dyna.actor, PLAYER_CSACTION_8);
|
||||||
this->actionFunc = BgGndIceblock_Slide;
|
this->actionFunc = BgGndIceblock_Slide;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -280,7 +280,7 @@ void BgGndIceblock_Fall(BgGndIceblock* this, PlayState* play) {
|
||||||
thisx->world.pos.y = thisx->home.pos.y - 100.0f;
|
thisx->world.pos.y = thisx->home.pos.y - 100.0f;
|
||||||
thisx->world.pos.z = thisx->home.pos.z;
|
thisx->world.pos.z = thisx->home.pos.z;
|
||||||
if (Player_InCsMode(play)) {
|
if (Player_InCsMode(play)) {
|
||||||
func_8002DF54(play, thisx, PLAYER_CSMODE_7);
|
Player_SetCsActionWithHaltedActors(play, thisx, PLAYER_CSACTION_7);
|
||||||
}
|
}
|
||||||
this->actionFunc = BgGndIceblock_Reset;
|
this->actionFunc = BgGndIceblock_Reset;
|
||||||
}
|
}
|
||||||
|
@ -293,7 +293,7 @@ void BgGndIceblock_Hole(BgGndIceblock* this, PlayState* play) {
|
||||||
if (Math_StepToF(&thisx->world.pos.y, thisx->home.pos.y - 100.0f, thisx->velocity.y)) {
|
if (Math_StepToF(&thisx->world.pos.y, thisx->home.pos.y - 100.0f, thisx->velocity.y)) {
|
||||||
thisx->velocity.y = 0.0f;
|
thisx->velocity.y = 0.0f;
|
||||||
if (Player_InCsMode(play)) {
|
if (Player_InCsMode(play)) {
|
||||||
func_8002DF54(play, thisx, PLAYER_CSMODE_7);
|
Player_SetCsActionWithHaltedActors(play, thisx, PLAYER_CSACTION_7);
|
||||||
}
|
}
|
||||||
this->actionFunc = BgGndIceblock_Idle;
|
this->actionFunc = BgGndIceblock_Idle;
|
||||||
}
|
}
|
||||||
|
@ -317,7 +317,7 @@ void BgGndIceblock_Slide(BgGndIceblock* this, PlayState* play) {
|
||||||
switch (BgGndIceblock_NextAction(this)) {
|
switch (BgGndIceblock_NextAction(this)) {
|
||||||
case GNDICE_IDLE:
|
case GNDICE_IDLE:
|
||||||
this->actionFunc = BgGndIceblock_Idle;
|
this->actionFunc = BgGndIceblock_Idle;
|
||||||
func_8002DF54(play, thisx, PLAYER_CSMODE_7);
|
Player_SetCsActionWithHaltedActors(play, thisx, PLAYER_CSACTION_7);
|
||||||
break;
|
break;
|
||||||
case GNDICE_FALL:
|
case GNDICE_FALL:
|
||||||
this->actionFunc = BgGndIceblock_Fall;
|
this->actionFunc = BgGndIceblock_Fall;
|
||||||
|
|
|
@ -15,15 +15,15 @@ void BgGndNisekabe_Update(Actor* thisx, PlayState* play);
|
||||||
void BgGndNisekabe_Draw(Actor* thisx, PlayState* play);
|
void BgGndNisekabe_Draw(Actor* thisx, PlayState* play);
|
||||||
|
|
||||||
ActorInit Bg_Gnd_Nisekabe_InitVars = {
|
ActorInit Bg_Gnd_Nisekabe_InitVars = {
|
||||||
ACTOR_BG_GND_NISEKABE,
|
/**/ ACTOR_BG_GND_NISEKABE,
|
||||||
ACTORCAT_PROP,
|
/**/ ACTORCAT_PROP,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_DEMO_KEKKAI,
|
/**/ OBJECT_DEMO_KEKKAI,
|
||||||
sizeof(BgGndNisekabe),
|
/**/ sizeof(BgGndNisekabe),
|
||||||
(ActorFunc)BgGndNisekabe_Init,
|
/**/ BgGndNisekabe_Init,
|
||||||
(ActorFunc)BgGndNisekabe_Destroy,
|
/**/ BgGndNisekabe_Destroy,
|
||||||
(ActorFunc)BgGndNisekabe_Update,
|
/**/ BgGndNisekabe_Update,
|
||||||
(ActorFunc)BgGndNisekabe_Draw,
|
/**/ BgGndNisekabe_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
void BgGndNisekabe_Init(Actor* thisx, PlayState* play) {
|
void BgGndNisekabe_Init(Actor* thisx, PlayState* play) {
|
||||||
|
|
|
@ -20,15 +20,15 @@ void func_8087B284(BgGndSoulmeiro* this, PlayState* play);
|
||||||
void func_8087B350(BgGndSoulmeiro* this, PlayState* play);
|
void func_8087B350(BgGndSoulmeiro* this, PlayState* play);
|
||||||
|
|
||||||
ActorInit Bg_Gnd_Soulmeiro_InitVars = {
|
ActorInit Bg_Gnd_Soulmeiro_InitVars = {
|
||||||
ACTOR_BG_GND_SOULMEIRO,
|
/**/ ACTOR_BG_GND_SOULMEIRO,
|
||||||
ACTORCAT_PROP,
|
/**/ ACTORCAT_PROP,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_DEMO_KEKKAI,
|
/**/ OBJECT_DEMO_KEKKAI,
|
||||||
sizeof(BgGndSoulmeiro),
|
/**/ sizeof(BgGndSoulmeiro),
|
||||||
(ActorFunc)BgGndSoulmeiro_Init,
|
/**/ BgGndSoulmeiro_Init,
|
||||||
(ActorFunc)BgGndSoulmeiro_Destroy,
|
/**/ BgGndSoulmeiro_Destroy,
|
||||||
(ActorFunc)BgGndSoulmeiro_Update,
|
/**/ BgGndSoulmeiro_Update,
|
||||||
(ActorFunc)BgGndSoulmeiro_Draw,
|
/**/ BgGndSoulmeiro_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColliderCylinderInit sCylinderInit = {
|
static ColliderCylinderInit sCylinderInit = {
|
||||||
|
|
|
@ -21,15 +21,15 @@ void func_8087BAAC(BgHaka* this, PlayState* play);
|
||||||
void func_8087BAE4(BgHaka* this, PlayState* play);
|
void func_8087BAE4(BgHaka* this, PlayState* play);
|
||||||
|
|
||||||
ActorInit Bg_Haka_InitVars = {
|
ActorInit Bg_Haka_InitVars = {
|
||||||
ACTOR_BG_HAKA,
|
/**/ ACTOR_BG_HAKA,
|
||||||
ACTORCAT_BG,
|
/**/ ACTORCAT_BG,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_HAKA,
|
/**/ OBJECT_HAKA,
|
||||||
sizeof(BgHaka),
|
/**/ sizeof(BgHaka),
|
||||||
(ActorFunc)BgHaka_Init,
|
/**/ BgHaka_Init,
|
||||||
(ActorFunc)BgHaka_Destroy,
|
/**/ BgHaka_Destroy,
|
||||||
(ActorFunc)BgHaka_Update,
|
/**/ BgHaka_Update,
|
||||||
(ActorFunc)BgHaka_Draw,
|
/**/ BgHaka_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
static InitChainEntry sInitChain[] = {
|
static InitChainEntry sInitChain[] = {
|
||||||
|
|
|
@ -53,15 +53,15 @@ static f32 sStatueDistToPlayer = 0;
|
||||||
static s16 sStatueRotY;
|
static s16 sStatueRotY;
|
||||||
|
|
||||||
ActorInit Bg_Haka_Gate_InitVars = {
|
ActorInit Bg_Haka_Gate_InitVars = {
|
||||||
ACTOR_BG_HAKA_GATE,
|
/**/ ACTOR_BG_HAKA_GATE,
|
||||||
ACTORCAT_PROP,
|
/**/ ACTORCAT_PROP,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_HAKA_OBJECTS,
|
/**/ OBJECT_HAKA_OBJECTS,
|
||||||
sizeof(BgHakaGate),
|
/**/ sizeof(BgHakaGate),
|
||||||
(ActorFunc)BgHakaGate_Init,
|
/**/ BgHakaGate_Init,
|
||||||
(ActorFunc)BgHakaGate_Destroy,
|
/**/ BgHakaGate_Destroy,
|
||||||
(ActorFunc)BgHakaGate_Update,
|
/**/ BgHakaGate_Update,
|
||||||
(ActorFunc)BgHakaGate_Draw,
|
/**/ BgHakaGate_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
static InitChainEntry sInitChain[] = {
|
static InitChainEntry sInitChain[] = {
|
||||||
|
|
|
@ -25,15 +25,15 @@ void func_8087D720(BgHakaHuta* this, PlayState* play);
|
||||||
void BgHakaHuta_DoNothing(BgHakaHuta* this, PlayState* play);
|
void BgHakaHuta_DoNothing(BgHakaHuta* this, PlayState* play);
|
||||||
|
|
||||||
ActorInit Bg_Haka_Huta_InitVars = {
|
ActorInit Bg_Haka_Huta_InitVars = {
|
||||||
ACTOR_BG_HAKA_HUTA,
|
/**/ ACTOR_BG_HAKA_HUTA,
|
||||||
ACTORCAT_BG,
|
/**/ ACTORCAT_BG,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_HAKACH_OBJECTS,
|
/**/ OBJECT_HAKACH_OBJECTS,
|
||||||
sizeof(BgHakaHuta),
|
/**/ sizeof(BgHakaHuta),
|
||||||
(ActorFunc)BgHakaHuta_Init,
|
/**/ BgHakaHuta_Init,
|
||||||
(ActorFunc)BgHakaHuta_Destroy,
|
/**/ BgHakaHuta_Destroy,
|
||||||
(ActorFunc)BgHakaHuta_Update,
|
/**/ BgHakaHuta_Update,
|
||||||
(ActorFunc)BgHakaHuta_Draw,
|
/**/ BgHakaHuta_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
static InitChainEntry sInitChain[] = {
|
static InitChainEntry sInitChain[] = {
|
||||||
|
|
|
@ -20,15 +20,15 @@ void func_8087DBF0(BgHakaMegane* this, PlayState* play);
|
||||||
void BgHakaMegane_DoNothing(BgHakaMegane* this, PlayState* play);
|
void BgHakaMegane_DoNothing(BgHakaMegane* this, PlayState* play);
|
||||||
|
|
||||||
ActorInit Bg_Haka_Megane_InitVars = {
|
ActorInit Bg_Haka_Megane_InitVars = {
|
||||||
ACTOR_BG_HAKA_MEGANE,
|
/**/ ACTOR_BG_HAKA_MEGANE,
|
||||||
ACTORCAT_PROP,
|
/**/ ACTORCAT_PROP,
|
||||||
FLAGS,
|
/**/ FLAGS,
|
||||||
OBJECT_GAMEPLAY_KEEP,
|
/**/ OBJECT_GAMEPLAY_KEEP,
|
||||||
sizeof(BgHakaMegane),
|
/**/ sizeof(BgHakaMegane),
|
||||||
(ActorFunc)BgHakaMegane_Init,
|
/**/ BgHakaMegane_Init,
|
||||||
(ActorFunc)BgHakaMegane_Destroy,
|
/**/ BgHakaMegane_Destroy,
|
||||||
(ActorFunc)BgHakaMegane_Update,
|
/**/ BgHakaMegane_Update,
|
||||||
NULL,
|
/**/ NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
static InitChainEntry sInitChain[] = {
|
static InitChainEntry sInitChain[] = {
|
||||||
|
|
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