summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/PowerPC_EABI_Support/Runtime/Inc/MWCPlusLib.h33
-rw-r--r--src/PowerPC_EABI_Support/Runtime/Inc/NMWException.h5
-rw-r--r--src/PowerPC_EABI_Support/Runtime/Src/NMWException.cp309
-rw-r--r--src/PowerPC_EABI_Support/Runtime/Src/__init_cpp_exceptions.cpp27
-rw-r--r--src/PowerPC_EABI_Support/Runtime/Src/__mem.c20
-rw-r--r--src/PowerPC_EABI_Support/Runtime/Src/global_destructor_chain.c8
-rw-r--r--src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk.c17
-rw-r--r--src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mem_TRK.c22
-rw-r--r--src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Export/targsupp.c42
-rw-r--r--src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Export/targsupp.s25
-rw-r--r--src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/exception.s476
-rw-r--r--src/d/actor/d_a_alink.cpp186
-rw-r--r--src/d/actor/d_a_alink_hang.inc2
-rw-r--r--src/d/actor/d_a_alink_wolf.inc2
-rw-r--r--src/d/actor/d_a_e_pz.cpp4949
-rw-r--r--src/f_pc/f_pc_base.cpp35
-rw-r--r--src/f_pc/f_pc_create_req.cpp44
-rw-r--r--src/f_pc/f_pc_creator.cpp4
-rw-r--r--src/f_pc/f_pc_debug_sv.cpp858
-rw-r--r--src/f_pc/f_pc_delete_tag.cpp19
-rw-r--r--src/f_pc/f_pc_deletor.cpp37
-rw-r--r--src/f_pc/f_pc_executor.cpp33
-rw-r--r--src/f_pc/f_pc_layer.cpp37
-rw-r--r--src/f_pc/f_pc_layer_iter.cpp33
-rw-r--r--src/f_pc/f_pc_leaf.cpp15
-rw-r--r--src/f_pc/f_pc_line_tag.cpp4
-rw-r--r--src/f_pc/f_pc_load.cpp4
-rw-r--r--src/f_pc/f_pc_manager.cpp15
-rw-r--r--src/f_pc/f_pc_node.cpp20
-rw-r--r--src/f_pc/f_pc_node_req.cpp48
-rw-r--r--src/f_pc/f_pc_pause.cpp25
-rw-r--r--src/f_pc/f_pc_priority.cpp39
-rw-r--r--src/f_pc/f_pc_profile.cpp3
-rw-r--r--src/f_pc/f_pc_searcher.cpp6
-rw-r--r--src/f_pc/f_pc_stdcreate_req.cpp41
35 files changed, 4616 insertions, 2827 deletions
diff --git a/src/PowerPC_EABI_Support/Runtime/Inc/MWCPlusLib.h b/src/PowerPC_EABI_Support/Runtime/Inc/MWCPlusLib.h
new file mode 100644
index 0000000000..7ec6b8f736
--- /dev/null
+++ b/src/PowerPC_EABI_Support/Runtime/Inc/MWCPlusLib.h
@@ -0,0 +1,33 @@
+#ifndef MWCPLUSLIB_H
+#define MWCPLUSLIB_H
+
+#include <stddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define CTORARG_TYPE int
+#define CTORARG_PARTIAL (0)
+#define CTORARG_COMPLETE (1)
+
+#define CTORCALL_COMPLETE(ctor, objptr) (((void (*)(void*, CTORARG_TYPE))ctor)(objptr, CTORARG_COMPLETE))
+
+#define DTORARG_TYPE int
+
+#define DTORCALL_COMPLETE(dtor, objptr) (((void (*)(void*, DTORARG_TYPE))dtor)(objptr, -1))
+
+typedef void* ConstructorDestructor;
+
+extern void __construct_array(void* ptr, ConstructorDestructor ctor, ConstructorDestructor dtor, size_t size, size_t n);
+extern void __destroy_arr(void* block, ConstructorDestructor* dtor, size_t size, size_t n);
+extern void* __construct_new_array(void* block, ConstructorDestructor ctor, ConstructorDestructor dtor_arg, size_t size, size_t n);
+extern void __destroy_new_array(void* block, ConstructorDestructor dtor);
+extern void __destroy_new_array2();
+extern void __destroy_new_array3();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* MWCPLUSLIB_H */
diff --git a/src/PowerPC_EABI_Support/Runtime/Inc/NMWException.h b/src/PowerPC_EABI_Support/Runtime/Inc/NMWException.h
index 3040f5a994..8ac4c589af 100644
--- a/src/PowerPC_EABI_Support/Runtime/Inc/NMWException.h
+++ b/src/PowerPC_EABI_Support/Runtime/Inc/NMWException.h
@@ -7,7 +7,8 @@
extern "C" {
#endif
-#define DTORCALL(dtor, objptr) (((void (*)(void*, int))dtor)(objptr, -1))
+typedef short vbase_ctor_arg_type;
+typedef char local_cond_type;
typedef struct DestructorChain {
struct DestructorChain* next;
@@ -24,4 +25,4 @@ void __destroy_global_chain(void);
}
#endif
-#endif /* NMWEXCEPTION_H */ \ No newline at end of file
+#endif /* NMWEXCEPTION_H */
diff --git a/src/PowerPC_EABI_Support/Runtime/Src/NMWException.cp b/src/PowerPC_EABI_Support/Runtime/Src/NMWException.cp
index f665dbbf3b..3285b3ebdf 100644
--- a/src/PowerPC_EABI_Support/Runtime/Src/NMWException.cp
+++ b/src/PowerPC_EABI_Support/Runtime/Src/NMWException.cp
@@ -1,121 +1,218 @@
-//
-// Generated By: dol2asm
-// Translation Unit: NMWException
-//
-
#include "NMWException.h"
-#include "stddef.h"
-#include "dol2asm.h"
+#include "MWCPlusLib.h"
-//
-// Types:
-//
+typedef void (*unexpected_handler)();
+unexpected_handler set_unexpected(unexpected_handler handler);
+void unexpected();
-struct __partial_array_destructor {
- /* 80361E5C */ ~__partial_array_destructor();
-};
+typedef void (*terminate_handler)();
+terminate_handler set_terminate(terminate_handler handler);
+void terminate();
-//
-// Forward References:
-//
-
-#pragma section "extabindex_"
-extern void* const data_8000569C[8];
-extern "C" void __destroy_new_array();
-extern "C" void __destroy_arr();
-extern "C" void __construct_array();
-extern "C" void __dt__26__partial_array_destructorFv();
-extern "C" void __construct_new_array();
-
-//
-// External References:
-//
-
-#pragma section "extab_"
-extern "C" extern void* const _section_symbol_extab[18];
-extern "C" void __dl__FPv();
-extern "C" void __dla__FPv();
-
-//
-// Declarations:
-//
-
-/* 80361C6C-80361CE8 35C5AC 007C+00 2/0 11/11 3/3 .text __destroy_new_array */
-void __destroy_new_array() {
- // NONMATCHING
-}
+#define ARRAY_HEADER_SIZE 16
-/* 80361CE8-80361D60 35C628 0078+00 1/0 58/58 350/350 .text __destroy_arr */
-void __destroy_arr() {
- // NONMATCHING
+extern "C" {
+extern void abort();
}
-/* 80361D60-80361E5C 35C6A0 00FC+00 1/0 98/98 461/461 .text __construct_array */
-void __construct_array() {
- // NONMATCHING
+namespace std {
+static void dthandler() { abort(); }
+
+static terminate_handler thandler = dthandler;
+
+static void duhandler() { terminate(); }
+
+static unexpected_handler uhandler = duhandler;
+
+extern terminate_handler set_terminate(terminate_handler handler) {
+ terminate_handler old = thandler;
+ thandler = handler;
+ return old;
}
-/* 80361E5C-80361F14 35C79C 00B8+00 1/0 1/0 0/0 .text __dt__26__partial_array_destructorFv */
-__partial_array_destructor::~__partial_array_destructor() {
- // NONMATCHING
+extern void terminate() { thandler(); }
+
+extern unexpected_handler set_unexpected(unexpected_handler handler) {
+ unexpected_handler old = uhandler;
+ uhandler = handler;
+ return old;
}
-/* 80361F14-80362018 35C854 0104+00 1/0 28/28 13/13 .text __construct_new_array */
-void __construct_new_array() {
- // NONMATCHING
+extern void unexpected() { uhandler(); }
+} // namespace std
+
+extern char __throw_catch_compare(const char* throwtype, const char* catchtype, long* offset_result) {
+ const char *cptr1, *cptr2;
+
+ *offset_result = 0;
+
+ if ((cptr2 = catchtype) == 0) {
+ return true;
+ }
+
+ cptr1 = throwtype;
+
+ if (*cptr2 == 'P') {
+ cptr2++;
+ if (*cptr2 == 'C')
+ cptr2++;
+ if (*cptr2 == 'V')
+ cptr2++;
+ if (*cptr2 == 'v') {
+ if (*cptr1 == 'P' || *cptr1 == '*') {
+ return true;
+ }
+ }
+ cptr2 = catchtype;
+ }
+
+ switch (*cptr1) {
+ case '*':
+ case '!':
+ if (*cptr1++ != *cptr2++)
+ return false;
+ for (;;) {
+ if (*cptr1 == *cptr2++) {
+ if (*cptr1++ == '!') {
+ long offset;
+
+ for (offset = 0; *cptr1 != '!';) {
+ offset = offset * 10 + *cptr1++ - '0';
+ }
+ *offset_result = offset;
+ return true;
+ }
+ } else {
+ while (*cptr1++ != '!') { }
+ while (*cptr1++ != '!') { }
+ if (*cptr1 == 0)
+ return false;
+
+ cptr2 = catchtype + 1;
+ }
+ }
+ return false;
+ }
+
+ while ((*cptr1 == 'P' || *cptr1 == 'R') && *cptr1 == *cptr2) {
+ cptr1++;
+ cptr2++;
+
+ if (*cptr2 == 'C') {
+ if (*cptr1 == 'C')
+ cptr1++;
+ cptr2++;
+ }
+ if (*cptr1 == 'C')
+ return false;
+
+ if (*cptr2 == 'V') {
+ if (*cptr1 == 'V')
+ cptr1++;
+ cptr2++;
+ }
+ if (*cptr1 == 'V')
+ return false;
+ }
+
+ for (; *cptr1 == *cptr2; cptr1++, cptr2++) {
+ if (*cptr1 == 0)
+ return true;
+ }
+
+ return false;
}
-/* ############################################################################################## */
-/* 80005660-8000566C -00001 000C+00 1/0 0/0 0/0 .extabindex @206 */
-SECTION_EXTABINDEX static void* const lit_206[3] = {
- (void*)__destroy_new_array,
- (void*)0x0000007C,
- (void*)&_section_symbol_extab,
+class __partial_array_destructor {
+private:
+ void* p;
+ size_t size;
+ size_t n;
+ ConstructorDestructor dtor;
+
+public:
+ size_t i;
+
+ __partial_array_destructor(void* array, size_t elementsize, size_t nelements, ConstructorDestructor destructor) {
+ p = array;
+ size = elementsize;
+ n = nelements;
+ dtor = destructor;
+ i = n;
+ }
+
+ ~__partial_array_destructor() {
+ char* ptr;
+
+ if (i < n && dtor) {
+ for (ptr = (char*)p + size * i; i > 0; i--) {
+ ptr -= size;
+ DTORCALL_COMPLETE(dtor, ptr);
+ }
+ }
+ }
};
-/* 8000566C-80005678 -00001 000C+00 0/0 0/0 0/0 .extabindex @211 */
-#pragma push
-#pragma force_active on
-SECTION_EXTABINDEX static void* const lit_211[3] = {
- (void*)__destroy_arr,
- (void*)0x00000078,
- (void*)(((char*)&_section_symbol_extab) + 0x8),
-};
-#pragma pop
-
-/* 80005678-80005684 -00001 000C+00 0/0 0/0 0/0 .extabindex @232 */
-#pragma push
-#pragma force_active on
-SECTION_EXTABINDEX static void* const lit_232[3] = {
- (void*)__construct_array,
- (void*)0x000000FC,
- (void*)(((char*)&_section_symbol_extab) + 0x10),
-};
-#pragma pop
-
-/* 80005684-80005690 -00001 000C+00 0/0 0/0 0/0 .extabindex @240 */
-#pragma push
-#pragma force_active on
-SECTION_EXTABINDEX static void* const lit_240[3] = {
- (void*)__dt__26__partial_array_destructorFv,
- (void*)0x000000B8,
- (void*)(((char*)&_section_symbol_extab) + 0x28),
-};
-#pragma pop
-
-/* 80005690-8000569C -00001 000C+00 0/0 0/0 0/0 .extabindex @263 */
-#pragma push
-#pragma force_active on
-SECTION_EXTABINDEX static void* const lit_263[3] = {
- (void*)__construct_new_array,
- (void*)0x00000104,
- (void*)(((char*)&_section_symbol_extab) + 0x30),
-};
-#pragma pop
-
-/* 8000569C-800056BC -00001 0020+00 1/0 1/1 0/0 .extabindex None */
-SECTION_EXTABINDEX extern void* const data_8000569C[8] = {
- (void*)&lit_206, (void*)&data_8000569C, (void*)__destroy_new_array,
- (void*)0x000003AC, (void*)NULL, (void*)NULL,
- (void*)NULL, (void*)NULL,
-}; \ No newline at end of file
+extern void* __construct_new_array(void* block, ConstructorDestructor ctor, ConstructorDestructor dtor, size_t size, size_t n) {
+ char* ptr;
+
+ if ((ptr = (char*)block) != 0L) {
+ size_t* p = (size_t*)ptr;
+
+ p[0] = size;
+ p[1] = n;
+ ptr += ARRAY_HEADER_SIZE;
+
+ if (ctor) {
+ __partial_array_destructor pad(ptr, size, n, dtor);
+ char* p;
+
+ for (pad.i = 0, p = (char*)ptr; pad.i < n; pad.i++, p += size) {
+ CTORCALL_COMPLETE(ctor, p);
+ }
+ }
+ }
+ return ptr;
+}
+
+extern void __construct_array(void* ptr, ConstructorDestructor ctor, ConstructorDestructor dtor, size_t size, size_t n) {
+ __partial_array_destructor pad(ptr, size, n, dtor);
+ char* p;
+
+ for (pad.i = 0, p = (char*)ptr; pad.i < n; pad.i++, p += size) {
+ CTORCALL_COMPLETE(ctor, p);
+ }
+}
+
+extern void __destroy_arr(void* block, ConstructorDestructor* dtor, size_t size, size_t n) {
+ char* p;
+
+ for (p = (char*)block + size * n; n > 0; n--) {
+ p -= size;
+ DTORCALL_COMPLETE(dtor, p);
+ }
+}
+
+extern void __destroy_new_array(void* block, ConstructorDestructor dtor) {
+ if (block) {
+ if (dtor) {
+ size_t i, objects, objectsize;
+ char* p;
+
+ objectsize = *(size_t*)((char*)block - ARRAY_HEADER_SIZE);
+ objects = ((size_t*)((char*)block - ARRAY_HEADER_SIZE))[1];
+ p = (char*)block + (objectsize * objects);
+
+ for (i = 0; i < objects; i++) {
+ p -= objectsize;
+ DTORCALL_COMPLETE(dtor, p);
+ }
+ }
+
+ ::operator delete[]((char*)block - ARRAY_HEADER_SIZE);
+ }
+}
+
+void __destroy_new_array2(void) {}
+
+void __destroy_new_array3(void) {}
diff --git a/src/PowerPC_EABI_Support/Runtime/Src/__init_cpp_exceptions.cpp b/src/PowerPC_EABI_Support/Runtime/Src/__init_cpp_exceptions.cpp
index 4ac4f043ad..770f206405 100644
--- a/src/PowerPC_EABI_Support/Runtime/Src/__init_cpp_exceptions.cpp
+++ b/src/PowerPC_EABI_Support/Runtime/Src/__init_cpp_exceptions.cpp
@@ -23,20 +23,20 @@ extern int __register_fragment(struct __eti_init_info* info, char* TOC);
/* 80450AD0-80450AD8 000550 0004+04 2/2 0/0 0/0 .sdata fragmentID */
static int fragmentID = -2;
-/* clang-format off */
-static asm char* GetR2() {
- nofralloc
- mr r3, r2
- blr
+extern void GetR2(char** R2) {
+ register char* temp;
+ asm {
+ mr temp, r2
+ }
+ *R2 = temp;
}
-/* clang-format on */
/* 80362870-803628AC 35D1B0 003C+00 1/0 1/0 0/0 .text __init_cpp_exceptions */
void __init_cpp_exceptions(void) {
- // NONMATCHING
char* R2;
+
if (fragmentID == -2) {
- R2 = GetR2();
+ GetR2(&R2);
fragmentID = __register_fragment(_eti_init_info, R2);
}
}
@@ -51,13 +51,16 @@ void __fini_cpp_exceptions(void) {
}
/* 803737C0-803737C4 000000 0004+00 0/0 1/1 0/0 .ctors __init_cpp_exceptions_reference */
-__declspec(section ".ctors")
+#pragma section ".ctors$10"
+__declspec(section ".ctors$10")
extern void* const __init_cpp_exceptions_reference = __init_cpp_exceptions;
/* 80373980-80373984 000000 0004+00 0/0 1/1 0/0 .dtors __destroy_global_chain_reference */
-__declspec(section ".dtors")
+#pragma section ".dtors$10"
+__declspec(section ".dtors$10")
extern void* const __destroy_global_chain_reference = __destroy_global_chain;
/* 80373984-80373988 000004 0004+00 0/0 0/1 0/0 .dtors __fini_cpp_exceptions_reference */
-__declspec(section ".dtors")
-extern void* const __fini_cpp_exceptions_reference = __fini_cpp_exceptions; \ No newline at end of file
+#pragma section ".dtors$15"
+__declspec(section ".dtors$15")
+extern void* const __fini_cpp_exceptions_reference = __fini_cpp_exceptions;
diff --git a/src/PowerPC_EABI_Support/Runtime/Src/__mem.c b/src/PowerPC_EABI_Support/Runtime/Src/__mem.c
index bd2192b4dc..51625f39b4 100644
--- a/src/PowerPC_EABI_Support/Runtime/Src/__mem.c
+++ b/src/PowerPC_EABI_Support/Runtime/Src/__mem.c
@@ -1,24 +1,6 @@
#include "dol2asm.h"
#include <dolphin.h>
-/* 800035C0-800035E4 0004C0 0024+00 0/0 12/12 0/0 .init TRK_memcpy */
-SECTION_INIT void* TRK_memcpy(void* dst, const void* src, size_t n) {
- const unsigned char* s = (const unsigned char*)src - 1;
- unsigned char* d = (unsigned char*)dst - 1;
-
- n++;
- while (--n != 0)
- *++d = *++s;
- return dst;
-}
-
-/* 80003590-800035C0 000490 0030+00 0/0 1/1 0/0 .init TRK_memset */
-SECTION_INIT void* TRK_memset(void* dst, int val, size_t n) {
- TRK_fill_mem(dst, val, n);
-
- return dst;
-}
-
/* 80003540-80003590 000440 0050+00 1/1 63/63 6/6 .init memcpy */
SECTION_INIT void* memcpy(void* dst, const void* src, size_t n) {
const unsigned char* s;
@@ -104,4 +86,4 @@ SECTION_INIT void* memset(void* dst, int val, size_t n) {
__fill_mem(dst, val, n);
return dst;
-} \ No newline at end of file
+}
diff --git a/src/PowerPC_EABI_Support/Runtime/Src/global_destructor_chain.c b/src/PowerPC_EABI_Support/Runtime/Src/global_destructor_chain.c
index 0c7d4f56b2..ad8ad14ca1 100644
--- a/src/PowerPC_EABI_Support/Runtime/Src/global_destructor_chain.c
+++ b/src/PowerPC_EABI_Support/Runtime/Src/global_destructor_chain.c
@@ -1,4 +1,5 @@
#include "NMWException.h"
+#include "MWCPlusLib.h"
/* 80451988-80451990 000E88 0004+04 2/2 0/0 0/0 .sbss __global_destructor_chain */
DestructorChain* __global_destructor_chain;
@@ -17,11 +18,12 @@ void __destroy_global_chain(void) {
DestructorChain* iter;
while ((iter = __global_destructor_chain) != 0) {
__global_destructor_chain = iter->next;
- DTORCALL(iter->destructor, iter->object);
+ DTORCALL_COMPLETE(iter->destructor, iter->object);
}
}
/* clang-format off */
-__declspec(section ".dtors")
+#pragma section ".dtors$10"
+__declspec(section ".dtors$10")
static void* const __destroy_global_chain_reference = __destroy_global_chain;
-/* clang-format on */ \ No newline at end of file
+/* clang-format on */
diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk.c b/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk.c
index 183457c640..1efa3cc872 100644
--- a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk.c
+++ b/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk.c
@@ -6,6 +6,8 @@
#include "global.h"
#include "__ar.h"
+extern u32 _db_stack_addr;
+
#define EXCEPTIONMASK_ADDR 0x80000044
/* 8044F810-8044F818 07C530 0004+04 3/3 0/0 0/0 .bss lc_base */
@@ -28,6 +30,9 @@ static u32 TRK_ISR_OFFSETS[15] = {PPC_SystemReset,
PPC_SystemManagementInterrupt,
PPC_ThermalManagementInterrupt};
+void __TRK_copy_vectors(void);
+__declspec(section ".init") void __TRK_reset(void) { OSResetSystem(FALSE, 0, FALSE); }
+
/* 80371B7C-80371B9C 36C4BC 0020+00 0/0 1/1 0/0 .text EnableMetroTRKInterrupts */
void EnableMetroTRKInterrupts(void) {
EnableEXI2Interrupts();
@@ -46,11 +51,11 @@ u32 TRKTargetTranslate(u32 param_0) {
return param_0 & 0x3FFFFFFF | 0x80000000;
}
-extern u8 __TRK_unknown_data[];
+extern u8 gTRKInterruptVectorTable[];
void TRK_copy_vector(u32 offset) {
void* destPtr = (void*)TRKTargetTranslate(offset);
- TRK_memcpy(destPtr, (void*)(__TRK_unknown_data + offset), 0x100);
+ TRK_memcpy(destPtr, (void*)(gTRKInterruptVectorTable + offset), 0x100);
TRK_flush_cache(destPtr, 0x100);
}
@@ -246,8 +251,8 @@ asm void InitMetroTRK() {
mtspr 0x3f2, r0
mtspr 0x3f5, r0
//Restore stack pointer
- lis r1, 0x80459BC8@h
- ori r1, r1, 0x80459BC8@l
+ lis r1, _db_stack_addr@h
+ ori r1, r1, _db_stack_addr@l
mr r3, r5
bl InitMetroTRKCommTable //Initialize comm table
/*
@@ -307,8 +312,8 @@ asm void InitMetroTRK_BBA() {
mtspr 0x3f2, r0
mtspr 0x3f5, r0
//Restore the stack pointer
- lis r1, 0x80459BC8@h
- ori r1, r1, 0x80459BC8@l
+ lis r1, _db_stack_addr@h
+ ori r1, r1, _db_stack_addr@l
li r3, 2
bl InitMetroTRKCommTable //Initialize comm table as BBA hardware
/*
diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mem_TRK.c b/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mem_TRK.c
index a0a019ea14..51546fbbb0 100644
--- a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mem_TRK.c
+++ b/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mem_TRK.c
@@ -5,6 +5,7 @@
#include "TRK_MINNOW_DOLPHIN/MetroTRK/Portable/mem_TRK.h"
+#pragma dont_inline on
/* 8036F580-8036F638 369EC0 00B8+00 0/0 1/1 0/0 .text TRK_fill_mem */
void TRK_fill_mem(void* dst, int val, u32 n) {
u32 v, i, j;
@@ -55,4 +56,23 @@ void TRK_fill_mem(void* dst, int val, u32 n) {
do {
*++((u8*)dst) = v;
} while (--n);
-} \ No newline at end of file
+}
+#pragma dont_inline reset
+
+/* 800035C0-800035E4 0004C0 0024+00 0/0 12/12 0/0 .init TRK_memcpy */
+__declspec(section ".init") void* TRK_memcpy(void* dst, const void* src, size_t n) {
+ const unsigned char* s = (const unsigned char*)src - 1;
+ unsigned char* d = (unsigned char*)dst - 1;
+
+ n++;
+ while (--n != 0)
+ *++d = *++s;
+ return dst;
+}
+
+/* 80003590-800035C0 000490 0030+00 0/0 1/1 0/0 .init TRK_memset */
+__declspec(section ".init") void* TRK_memset(void* dst, int val, size_t n) {
+ TRK_fill_mem(dst, val, n);
+
+ return dst;
+}
diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Export/targsupp.c b/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Export/targsupp.c
deleted file mode 100644
index 992430cd88..0000000000
--- a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Export/targsupp.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * targsupp.c
- * Description:
- */
-
-#include "TRK_MINNOW_DOLPHIN/ppc/Export/targsupp.h"
-
-/* 803711D0-803711D8 -00001 0008+00 0/0 0/0 0/0 .text TRKAccessFile */
-asm u32 TRKAccessFile(u32, u32, u32*, u8*) {
- // clang-format off
- nofralloc
- twi 31, r0, 0x0
- blr
- // clang-format on
-}
-
-/* 803711D8-803711E0 -00001 0008+00 0/0 0/0 0/0 .text TRKOpenFile */
-asm u32 TRKOpenFile(u32, u32, u32*, u8*) {
- // clang-format off
- nofralloc
- twi 31, r0, 0x0
- blr
- // clang-format on
-}
-
-/* 803711E0-803711E8 -00001 0008+00 0/0 0/0 0/0 .text TRKCloseFile */
-asm u32 TRKCloseFile(u32, u32) {
- // clang-format off
- nofralloc
- twi 31, r0, 0x0
- blr
- // clang-format on
-}
-
-/* 803711E8-803711F0 -00001 0008+00 0/0 0/0 0/0 .text TRKPositionFile */
-asm u32 TRKPositionFile(u32, u32, u32*, u8*) {
- // clang-format off
- nofralloc
- twi 31, r0, 0x0
- blr
- // clang-format on
-} \ No newline at end of file
diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Export/targsupp.s b/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Export/targsupp.s
new file mode 100644
index 0000000000..0244131bd8
--- /dev/null
+++ b/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Export/targsupp.s
@@ -0,0 +1,25 @@
+.include "macros.inc"
+.file "targsupp.s"
+
+.text
+.balign 16
+
+.fn TRKAccessFile, global
+ twui r0, 0x0
+ blr
+.endfn TRKAccessFile
+
+.fn TRKOpenFile, global
+ twui r0, 0x0
+ blr
+.endfn TRKOpenFile
+
+.fn TRKCloseFile, global
+ twui r0, 0x0
+ blr
+.endfn TRKCloseFile
+
+.fn TRKPositionFile, global
+ twui r0, 0x0
+ blr
+.endfn TRKPositionFile
diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/exception.s b/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/exception.s
new file mode 100644
index 0000000000..10b501532c
--- /dev/null
+++ b/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/exception.s
@@ -0,0 +1,476 @@
+.include "macros.inc"
+
+.section .init, "ax" # 0x80003100 - 0x80005600
+
+.global gTRKInterruptVectorTable
+gTRKInterruptVectorTable:
+.asciz "Metrowerks Target Resident Kernel for PowerPC"
+.balign 4
+.fill 0xD0
+
+#############################################
+# Interrupt vector slot 0x0000 is reserved. #
+#############################################
+
+# Slot 0x0100: System Reset Exception
+ b __TRK_reset
+.fill 0xFC
+
+# Slot 0x0200: Machine Check Exception
+/* 80003354 00000354 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80003358 00000358 7C 5A 02 A6 */ mfspr r2, 0x1a
+/* 8000335C 0000035C 7C 00 17 AC */ icbi 0, r2
+/* 80003360 00000360 7C 53 02 A6 */ mfdar r2
+/* 80003364 00000364 7C 00 13 AC */ dcbi 0, r2
+/* 80003368 00000368 7C 51 42 A6 */ mfspr r2, 0x111
+/* 8000336C 0000036C 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80003370 00000370 7C 72 43 A6 */ mtspr 0x112, r3
+/* 80003374 00000374 7C 93 43 A6 */ mtspr 0x113, r4
+/* 80003378 00000378 7C 5A 02 A6 */ mfspr r2, 0x1a
+/* 8000337C 0000037C 7C 9B 02 A6 */ mfspr r4, 0x1b
+/* 80003380 00000380 7C 60 00 A6 */ mfmsr r3
+/* 80003384 00000384 60 63 00 30 */ ori r3, r3, 0x30
+/* 80003388 00000388 7C 7B 03 A6 */ mtspr 0x1b, r3
+/* 8000338C 0000038C 3C 60 80 0B */ lis r3, TRKInterruptHandler@h
+/* 80003390 00000390 60 63 DE F4 */ ori r3, r3, TRKInterruptHandler@l
+/* 80003394 00000394 7C 7A 03 A6 */ mtspr 0x1a, r3
+/* 80003398 00000398 38 60 02 00 */ li r3, 0x200
+/* 8000339C 0000039C 4C 00 00 64 */ rfi
+.fill 0xB4
+
+# Slot 0x0300: DSI Exception
+/* 80003454 00000454 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80003458 00000458 7C 72 43 A6 */ mtspr 0x112, r3
+/* 8000345C 0000045C 7C 93 43 A6 */ mtspr 0x113, r4
+/* 80003460 00000460 7C 5A 02 A6 */ mfspr r2, 0x1a
+/* 80003464 00000464 7C 9B 02 A6 */ mfspr r4, 0x1b
+/* 80003468 00000468 7C 60 00 A6 */ mfmsr r3
+/* 8000346C 0000046C 60 63 00 30 */ ori r3, r3, 0x30
+/* 80003470 00000470 7C 7B 03 A6 */ mtspr 0x1b, r3
+/* 80003474 00000474 3C 60 80 0B */ lis r3, TRKInterruptHandler@h
+/* 80003478 00000478 60 63 DE F4 */ ori r3, r3, TRKInterruptHandler@l
+/* 8000347C 0000047C 7C 7A 03 A6 */ mtspr 0x1a, r3
+/* 80003480 00000480 38 60 03 00 */ li r3, 0x300
+/* 80003484 00000484 4C 00 00 64 */ rfi
+.fill 0xCC
+
+# Slot 0x0400: ISI Exception
+/* 80003554 00000554 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80003558 00000558 7C 72 43 A6 */ mtspr 0x112, r3
+/* 8000355C 0000055C 7C 93 43 A6 */ mtspr 0x113, r4
+/* 80003560 00000560 7C 5A 02 A6 */ mfspr r2, 0x1a
+/* 80003564 00000564 7C 9B 02 A6 */ mfspr r4, 0x1b
+/* 80003568 00000568 7C 60 00 A6 */ mfmsr r3
+/* 8000356C 0000056C 60 63 00 30 */ ori r3, r3, 0x30
+/* 80003570 00000570 7C 7B 03 A6 */ mtspr 0x1b, r3
+/* 80003574 00000574 3C 60 80 0B */ lis r3, TRKInterruptHandler@h
+/* 80003578 00000578 60 63 DE F4 */ ori r3, r3, TRKInterruptHandler@l
+/* 8000357C 0000057C 7C 7A 03 A6 */ mtspr 0x1a, r3
+/* 80003580 00000580 38 60 04 00 */ li r3, 0x400
+/* 80003584 00000584 4C 00 00 64 */ rfi
+.fill 0xCC
+
+# Slot 0x0500: External Interrupt Exception
+/* 80003654 00000654 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80003658 00000658 7C 72 43 A6 */ mtspr 0x112, r3
+/* 8000365C 0000065C 7C 93 43 A6 */ mtspr 0x113, r4
+/* 80003660 00000660 7C 5A 02 A6 */ mfspr r2, 0x1a
+/* 80003664 00000664 7C 9B 02 A6 */ mfspr r4, 0x1b
+/* 80003668 00000668 7C 60 00 A6 */ mfmsr r3
+/* 8000366C 0000066C 60 63 00 30 */ ori r3, r3, 0x30
+/* 80003670 00000670 7C 7B 03 A6 */ mtspr 0x1b, r3
+/* 80003674 00000674 3C 60 80 0B */ lis r3, TRKInterruptHandler@h
+/* 80003678 00000678 60 63 DE F4 */ ori r3, r3, TRKInterruptHandler@l
+/* 8000367C 0000067C 7C 7A 03 A6 */ mtspr 0x1a, r3
+/* 80003680 00000680 38 60 05 00 */ li r3, 0x500
+/* 80003684 00000684 4C 00 00 64 */ rfi
+.fill 0xCC
+
+# Slot 0x0600: Alignment Exception
+/* 80003754 00000754 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80003758 00000758 7C 72 43 A6 */ mtspr 0x112, r3
+/* 8000375C 0000075C 7C 93 43 A6 */ mtspr 0x113, r4
+/* 80003760 00000760 7C 5A 02 A6 */ mfspr r2, 0x1a
+/* 80003764 00000764 7C 9B 02 A6 */ mfspr r4, 0x1b
+/* 80003768 00000768 7C 60 00 A6 */ mfmsr r3
+/* 8000376C 0000076C 60 63 00 30 */ ori r3, r3, 0x30
+/* 80003770 00000770 7C 7B 03 A6 */ mtspr 0x1b, r3
+/* 80003774 00000774 3C 60 80 0B */ lis r3, TRKInterruptHandler@h
+/* 80003778 00000778 60 63 DE F4 */ ori r3, r3, TRKInterruptHandler@l
+/* 8000377C 0000077C 7C 7A 03 A6 */ mtspr 0x1a, r3
+/* 80003780 00000780 38 60 06 00 */ li r3, 0x600
+/* 80003784 00000784 4C 00 00 64 */ rfi
+.fill 0xCC
+
+# Slot 0x0700: Program Exception
+/* 80003854 00000854 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80003858 00000858 7C 72 43 A6 */ mtspr 0x112, r3
+/* 8000385C 0000085C 7C 93 43 A6 */ mtspr 0x113, r4
+/* 80003860 00000860 7C 5A 02 A6 */ mfspr r2, 0x1a
+/* 80003864 00000864 7C 9B 02 A6 */ mfspr r4, 0x1b
+/* 80003868 00000868 7C 60 00 A6 */ mfmsr r3
+/* 8000386C 0000086C 60 63 00 30 */ ori r3, r3, 0x30
+/* 80003870 00000870 7C 7B 03 A6 */ mtspr 0x1b, r3
+/* 80003874 00000874 3C 60 80 0B */ lis r3, TRKInterruptHandler@h
+/* 80003878 00000878 60 63 DE F4 */ ori r3, r3, TRKInterruptHandler@l
+/* 8000387C 0000087C 7C 7A 03 A6 */ mtspr 0x1a, r3
+/* 80003880 00000880 38 60 07 00 */ li r3, 0x700
+/* 80003884 00000884 4C 00 00 64 */ rfi
+.fill 0xCC
+
+# Slot 0x0800: Floating Point Unavailable Exception
+/* 80003954 00000954 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80003958 00000958 7C 72 43 A6 */ mtspr 0x112, r3
+/* 8000395C 0000095C 7C 93 43 A6 */ mtspr 0x113, r4
+/* 80003960 00000960 7C 5A 02 A6 */ mfspr r2, 0x1a
+/* 80003964 00000964 7C 9B 02 A6 */ mfspr r4, 0x1b
+/* 80003968 00000968 7C 60 00 A6 */ mfmsr r3
+/* 8000396C 0000096C 60 63 00 30 */ ori r3, r3, 0x30
+/* 80003970 00000970 7C 7B 03 A6 */ mtspr 0x1b, r3
+/* 80003974 00000974 3C 60 80 0B */ lis r3, TRKInterruptHandler@h
+/* 80003978 00000978 60 63 DE F4 */ ori r3, r3, TRKInterruptHandler@l
+/* 8000397C 0000097C 7C 7A 03 A6 */ mtspr 0x1a, r3
+/* 80003980 00000980 38 60 08 00 */ li r3, 0x800
+/* 80003984 00000984 4C 00 00 64 */ rfi
+.fill 0xCC
+
+# Slot 0x0900: Decrementer Exception
+/* 80003A54 00000A54 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80003A58 00000A58 7C 72 43 A6 */ mtspr 0x112, r3
+/* 80003A5C 00000A5C 7C 93 43 A6 */ mtspr 0x113, r4
+/* 80003A60 00000A60 7C 5A 02 A6 */ mfspr r2, 0x1a
+/* 80003A64 00000A64 7C 9B 02 A6 */ mfspr r4, 0x1b
+/* 80003A68 00000A68 7C 60 00 A6 */ mfmsr r3
+/* 80003A6C 00000A6C 60 63 00 30 */ ori r3, r3, 0x30
+/* 80003A70 00000A70 7C 7B 03 A6 */ mtspr 0x1b, r3
+/* 80003A74 00000A74 3C 60 80 0B */ lis r3, TRKInterruptHandler@h
+/* 80003A78 00000A78 60 63 DE F4 */ ori r3, r3, TRKInterruptHandler@l
+/* 80003A7C 00000A7C 7C 7A 03 A6 */ mtspr 0x1a, r3
+/* 80003A80 00000A80 38 60 09 00 */ li r3, 0x900
+/* 80003A84 00000A84 4C 00 00 64 */ rfi
+.fill 0xCC
+
+######################################################
+# Interrupt vector slots 0x0A00 & 0x0B00 are reserved.
+.fill 0x100
+.fill 0x100
+######################################################
+
+# Slot 0x0C00: System Call Exception
+/* 80003D54 00000D54 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80003D58 00000D58 7C 72 43 A6 */ mtspr 0x112, r3
+/* 80003D5C 00000D5C 7C 93 43 A6 */ mtspr 0x113, r4
+/* 80003D60 00000D60 7C 5A 02 A6 */ mfspr r2, 0x1a
+/* 80003D64 00000D64 7C 9B 02 A6 */ mfspr r4, 0x1b
+/* 80003D68 00000D68 7C 60 00 A6 */ mfmsr r3
+/* 80003D6C 00000D6C 60 63 00 30 */ ori r3, r3, 0x30
+/* 80003D70 00000D70 7C 7B 03 A6 */ mtspr 0x1b, r3
+/* 80003D74 00000D74 3C 60 80 0B */ lis r3, TRKInterruptHandler@h
+/* 80003D78 00000D78 60 63 DE F4 */ ori r3, r3, TRKInterruptHandler@l
+/* 80003D7C 00000D7C 7C 7A 03 A6 */ mtspr 0x1a, r3
+/* 80003D80 00000D80 38 60 0C 00 */ li r3, 0xc00
+/* 80003D84 00000D84 4C 00 00 64 */ rfi
+.fill 0xCC
+
+# Slot 0x0D00: Trace Exception
+/* 80003E54 00000E54 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80003E58 00000E58 7C 72 43 A6 */ mtspr 0x112, r3
+/* 80003E5C 00000E5C 7C 93 43 A6 */ mtspr 0x113, r4
+/* 80003E60 00000E60 7C 5A 02 A6 */ mfspr r2, 0x1a
+/* 80003E64 00000E64 7C 9B 02 A6 */ mfspr r4, 0x1b
+/* 80003E68 00000E68 7C 60 00 A6 */ mfmsr r3
+/* 80003E6C 00000E6C 60 63 00 30 */ ori r3, r3, 0x30
+/* 80003E70 00000E70 7C 7B 03 A6 */ mtspr 0x1b, r3
+/* 80003E74 00000E74 3C 60 80 0B */ lis r3, TRKInterruptHandler@h
+/* 80003E78 00000E78 60 63 DE F4 */ ori r3, r3, TRKInterruptHandler@l
+/* 80003E7C 00000E7C 7C 7A 03 A6 */ mtspr 0x1a, r3
+/* 80003E80 00000E80 38 60 0D 00 */ li r3, 0xd00
+/* 80003E84 00000E84 4C 00 00 64 */ rfi
+.fill 0xCC
+
+############################################################################
+# Slot 0x0E00 is usually for the Floating Point Assist Exception Handler, #
+# however that exception is not implemented in the PPC 750CL architecture. #
+############################################################################
+
+# Slot 0x0F00: Performance Monitor Exception
+/* 80003F54 00000F54 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80003F58 00000F58 7C 72 43 A6 */ mtspr 0x112, r3
+/* 80003F5C 00000F5C 7C 93 43 A6 */ mtspr 0x113, r4
+/* 80003F60 00000F60 7C 5A 02 A6 */ mfspr r2, 0x1a
+/* 80003F64 00000F64 7C 9B 02 A6 */ mfspr r4, 0x1b
+/* 80003F68 00000F68 7C 60 00 A6 */ mfmsr r3
+/* 80003F6C 00000F6C 60 63 00 30 */ ori r3, r3, 0x30
+/* 80003F70 00000F70 7C 7B 03 A6 */ mtspr 0x1b, r3
+/* 80003F74 00000F74 3C 60 80 0B */ lis r3, TRKInterruptHandler@h
+/* 80003F78 00000F78 60 63 DE F4 */ ori r3, r3, TRKInterruptHandler@l
+/* 80003F7C 00000F7C 7C 7A 03 A6 */ mtspr 0x1a, r3
+/* 80003F80 00000F80 38 60 0E 00 */ li r3, 0xe00
+/* 80003F84 00000F84 4C 00 00 64 */ rfi
+.fill 0xCC
+
+##################################################################################
+# Interrupt vector slots 0x1000 through 0x1200 are not implemented in the 750CL. #
+##################################################################################
+
+# Slot 0x1300: Instruction Address Breakpoint Exception
+/* 80004054 00001054 48 00 00 54 */ b .L_800040A8
+.fill 0x1C
+/* 80004074 00001074 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80004078 00001078 7C 72 43 A6 */ mtspr 0x112, r3
+/* 8000407C 0000107C 7C 93 43 A6 */ mtspr 0x113, r4
+/* 80004080 00001080 7C 5A 02 A6 */ mfspr r2, 0x1a
+/* 80004084 00001084 7C 9B 02 A6 */ mfspr r4, 0x1b
+/* 80004088 00001088 7C 60 00 A6 */ mfmsr r3
+/* 8000408C 0000108C 60 63 00 30 */ ori r3, r3, 0x30
+/* 80004090 00001090 7C 7B 03 A6 */ mtspr 0x1b, r3
+/* 80004094 00001094 3C 60 80 0B */ lis r3, TRKInterruptHandler@h
+/* 80004098 00001098 60 63 DE F4 */ ori r3, r3, TRKInterruptHandler@l
+/* 8000409C 0000109C 7C 7A 03 A6 */ mtspr 0x1a, r3
+/* 800040A0 000010A0 38 60 0F 20 */ li r3, 0xf20
+/* 800040A4 000010A4 4C 00 00 64 */ rfi
+.L_800040A8:
+/* 800040A8 000010A8 7C 51 43 A6 */ mtspr 0x111, r2
+/* 800040AC 000010AC 7C 72 43 A6 */ mtspr 0x112, r3
+/* 800040B0 000010B0 7C 93 43 A6 */ mtspr 0x113, r4
+/* 800040B4 000010B4 7C 5A 02 A6 */ mfspr r2, 0x1a
+/* 800040B8 000010B8 7C 9B 02 A6 */ mfspr r4, 0x1b
+/* 800040BC 000010BC 7C 60 00 A6 */ mfmsr r3
+/* 800040C0 000010C0 60 63 00 30 */ ori r3, r3, 0x30
+/* 800040C4 000010C4 7C 7B 03 A6 */ mtspr 0x1b, r3
+/* 800040C8 000010C8 3C 60 80 0B */ lis r3, TRKInterruptHandler@h
+/* 800040CC 000010CC 60 63 DE F4 */ ori r3, r3, TRKInterruptHandler@l
+/* 800040D0 000010D0 7C 7A 03 A6 */ mtspr 0x1a, r3
+/* 800040D4 000010D4 38 60 0F 00 */ li r3, 0xf00
+/* 800040D8 000010D8 4C 00 00 64 */ rfi
+.fill 0x78
+
+# Slot 0x1400: System Management Interrupt Exception
+/* 80004154 00001154 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80004158 00001158 7C 40 00 26 */ mfcr r2
+/* 8000415C 0000115C 7C 52 43 A6 */ mtspr 0x112, r2
+/* 80004160 00001160 7C 40 00 A6 */ mfmsr r2
+/* 80004164 00001164 74 42 00 02 */ andis. r2, r2, 2
+/* 80004168 00001168 41 82 00 1C */ beq .L_80004184
+/* 8000416C 0000116C 7C 40 00 A6 */ mfmsr r2
+/* 80004170 00001170 6C 42 00 02 */ xoris r2, r2, 2
+/* 80004174 00001174 7C 00 04 AC */ sync 0
+/* 80004178 00001178 7C 40 01 24 */ mtmsr r2
+/* 8000417C 0000117C 7C 00 04 AC */ sync 0
+/* 80004180 00001180 7C 51 43 A6 */ mtspr 0x111, r2
+.L_80004184:
+/* 80004184 00001184 7C 52 42 A6 */ mfspr r2, 0x112
+/* 80004188 00001188 7C 4F F1 20 */ mtcrf 0xff, r2
+/* 8000418C 0000118C 7C 51 42 A6 */ mfspr r2, 0x111
+/* 80004190 00001190 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80004194 00001194 7C 72 43 A6 */ mtspr 0x112, r3
+/* 80004198 00001198 7C 93 43 A6 */ mtspr 0x113, r4
+/* 8000419C 0000119C 7C 5A 02 A6 */ mfspr r2, 0x1a
+/* 800041A0 000011A0 7C 9B 02 A6 */ mfspr r4, 0x1b
+/* 800041A4 000011A4 7C 60 00 A6 */ mfmsr r3
+/* 800041A8 000011A8 60 63 00 30 */ ori r3, r3, 0x30
+/* 800041AC 000011AC 7C 7B 03 A6 */ mtspr 0x1b, r3
+/* 800041B0 000011B0 3C 60 80 0B */ lis r3, TRKInterruptHandler@h
+/* 800041B4 000011B4 60 63 DE F4 */ ori r3, r3, TRKInterruptHandler@l
+/* 800041B8 000011B8 7C 7A 03 A6 */ mtspr 0x1a, r3
+/* 800041BC 000011BC 38 60 10 00 */ li r3, 0x1000
+/* 800041C0 000011C0 4C 00 00 64 */ rfi
+.fill 0x90
+
+
+##############################################################################
+# Interrupt vector slots 0x1500 and 0x1600 are not implemented in the 750CL. #
+##############################################################################
+
+# Slot 0x1700: Thermal-Management Interrupt Exception
+/* 80004254 00001254 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80004258 00001258 7C 40 00 26 */ mfcr r2
+/* 8000425C 0000125C 7C 52 43 A6 */ mtspr 0x112, r2
+/* 80004260 00001260 7C 40 00 A6 */ mfmsr r2
+/* 80004264 00001264 74 42 00 02 */ andis. r2, r2, 2
+/* 80004268 00001268 41 82 00 1C */ beq .L_80004284
+/* 8000426C 0000126C 7C 40 00 A6 */ mfmsr r2
+/* 80004270 00001270 6C 42 00 02 */ xoris r2, r2, 2
+/* 80004274 00001274 7C 00 04 AC */ sync 0
+/* 80004278 00001278 7C 40 01 24 */ mtmsr r2
+/* 8000427C 0000127C 7C 00 04 AC */ sync 0
+/* 80004280 00001280 7C 51 43 A6 */ mtspr 0x111, r2
+.L_80004284:
+/* 80004284 00001284 7C 52 42 A6 */ mfspr r2, 0x112
+/* 80004288 00001288 7C 4F F1 20 */ mtcrf 0xff, r2
+/* 8000428C 0000128C 7C 51 42 A6 */ mfspr r2, 0x111
+/* 80004290 00001290 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80004294 00001294 7C 72 43 A6 */ mtspr 0x112, r3
+/* 80004298 00001298 7C 93 43 A6 */ mtspr 0x113, r4
+/* 8000429C 0000129C 7C 5A 02 A6 */ mfspr r2, 0x1a
+/* 800042A0 000012A0 7C 9B 02 A6 */ mfspr r4, 0x1b
+/* 800042A4 000012A4 7C 60 00 A6 */ mfmsr r3
+/* 800042A8 000012A8 60 63 00 30 */ ori r3, r3, 0x30
+/* 800042AC 000012AC 7C 7B 03 A6 */ mtspr 0x1b, r3
+/* 800042B0 000012B0 3C 60 80 0B */ lis r3, TRKInterruptHandler@h
+/* 800042B4 000012B4 60 63 DE F4 */ ori r3, r3, TRKInterruptHandler@l
+/* 800042B8 000012B8 7C 7A 03 A6 */ mtspr 0x1a, r3
+/* 800042BC 000012BC 38 60 11 00 */ li r3, 0x1100
+/* 800042C0 000012C0 4C 00 00 64 */ rfi
+.fill 0x90
+
+# Slot 0x1800(?)
+/* 80004354 00001354 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80004358 00001358 7C 40 00 26 */ mfcr r2
+/* 8000435C 0000135C 7C 52 43 A6 */ mtspr 0x112, r2
+/* 80004360 00001360 7C 40 00 A6 */ mfmsr r2
+/* 80004364 00001364 74 42 00 02 */ andis. r2, r2, 2
+/* 80004368 00001368 41 82 00 1C */ beq .L_80004384
+/* 8000436C 0000136C 7C 40 00 A6 */ mfmsr r2
+/* 80004370 00001370 6C 42 00 02 */ xoris r2, r2, 2
+/* 80004374 00001374 7C 00 04 AC */ sync 0
+/* 80004378 00001378 7C 40 01 24 */ mtmsr r2
+/* 8000437C 0000137C 7C 00 04 AC */ sync 0
+/* 80004380 00001380 7C 51 43 A6 */ mtspr 0x111, r2
+.L_80004384:
+/* 80004384 00001384 7C 52 42 A6 */ mfspr r2, 0x112
+/* 80004388 00001388 7C 4F F1 20 */ mtcrf 0xff, r2
+/* 8000438C 0000138C 7C 51 42 A6 */ mfspr r2, 0x111
+/* 80004390 00001390 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80004394 00001394 7C 72 43 A6 */ mtspr 0x112, r3
+/* 80004398 00001398 7C 93 43 A6 */ mtspr 0x113, r4
+/* 8000439C 0000139C 7C 5A 02 A6 */ mfspr r2, 0x1a
+/* 800043A0 000013A0 7C 9B 02 A6 */ mfspr r4, 0x1b
+/* 800043A4 000013A4 7C 60 00 A6 */ mfmsr r3
+/* 800043A8 000013A8 60 63 00 30 */ ori r3, r3, 0x30
+/* 800043AC 000013AC 7C 7B 03 A6 */ mtspr 0x1b, r3
+/* 800043B0 000013B0 3C 60 80 0B */ lis r3, TRKInterruptHandler@h
+/* 800043B4 000013B4 60 63 DE F4 */ ori r3, r3, TRKInterruptHandler@l
+/* 800043B8 000013B8 7C 7A 03 A6 */ mtspr 0x1a, r3
+/* 800043BC 000013BC 38 60 12 00 */ li r3, 0x1200
+/* 800043C0 000013C0 4C 00 00 64 */ rfi
+.fill 0x90
+
+# Slot 0x1900(?)
+/* 80004454 00001454 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80004458 00001458 7C 72 43 A6 */ mtspr 0x112, r3
+/* 8000445C 0000145C 7C 93 43 A6 */ mtspr 0x113, r4
+/* 80004460 00001460 7C 5A 02 A6 */ mfspr r2, 0x1a
+/* 80004464 00001464 7C 9B 02 A6 */ mfspr r4, 0x1b
+/* 80004468 00001468 7C 60 00 A6 */ mfmsr r3
+/* 8000446C 0000146C 60 63 00 30 */ ori r3, r3, 0x30
+/* 80004470 00001470 7C 7B 03 A6 */ mtspr 0x1b, r3
+/* 80004474 00001474 3C 60 80 0B */ lis r3, TRKInterruptHandler@h
+/* 80004478 00001478 60 63 DE F4 */ ori r3, r3, TRKInterruptHandler@l
+/* 8000447C 0000147C 7C 7A 03 A6 */ mtspr 0x1a, r3
+/* 80004480 00001480 38 60 13 00 */ li r3, 0x1300
+/* 80004484 00001484 4C 00 00 64 */ rfi
+.fill 0xCC
+
+# Slot 0x1A00(?)
+/* 80004554 00001554 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80004558 00001558 7C 72 43 A6 */ mtspr 0x112, r3
+/* 8000455C 0000155C 7C 93 43 A6 */ mtspr 0x113, r4
+/* 80004560 00001560 7C 5A 02 A6 */ mfspr r2, 0x1a
+/* 80004564 00001564 7C 9B 02 A6 */ mfspr r4, 0x1b
+/* 80004568 00001568 7C 60 00 A6 */ mfmsr r3
+/* 8000456C 0000156C 60 63 00 30 */ ori r3, r3, 0x30
+/* 80004570 00001570 7C 7B 03 A6 */ mtspr 0x1b, r3
+/* 80004574 00001574 3C 60 80 0B */ lis r3, TRKInterruptHandler@h
+/* 80004578 00001578 60 63 DE F4 */ ori r3, r3, TRKInterruptHandler@l
+/* 8000457C 0000157C 7C 7A 03 A6 */ mtspr 0x1a, r3
+/* 80004580 00001580 38 60 14 00 */ li r3, 0x1400
+/* 80004584 00001584 4C 00 00 64 */ rfi
+.fill 0x1CC
+
+# Slot 0x1B00(?)
+/* 80004754 00001754 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80004758 00001758 7C 72 43 A6 */ mtspr 0x112, r3
+/* 8000475C 0000175C 7C 93 43 A6 */ mtspr 0x113, r4
+/* 80004760 00001760 7C 5A 02 A6 */ mfspr r2, 0x1a
+/* 80004764 00001764 7C 9B 02 A6 */ mfspr r4, 0x1b
+/* 80004768 00001768 7C 60 00 A6 */ mfmsr r3
+/* 8000476C 0000176C 60 63 00 30 */ ori r3, r3, 0x30
+/* 80004770 00001770 7C 7B 03 A6 */ mtspr 0x1b, r3
+/* 80004774 00001774 3C 60 80 0B */ lis r3, TRKInterruptHandler@h
+/* 80004778 00001778 60 63 DE F4 */ ori r3, r3, TRKInterruptHandler@l
+/* 8000477C 0000177C 7C 7A 03 A6 */ mtspr 0x1a, r3
+/* 80004780 00001780 38 60 16 00 */ li r3, 0x1600
+/* 80004784 00001784 4C 00 00 64 */ rfi
+.fill 0xCC
+
+# Slot 0x1C00(?)
+/* 80004854 00001854 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80004858 00001858 7C 72 43 A6 */ mtspr 0x112, r3
+/* 8000485C 0000185C 7C 93 43 A6 */ mtspr 0x113, r4
+/* 80004860 00001860 7C 5A 02 A6 */ mfspr r2, 0x1a
+/* 80004864 00001864 7C 9B 02 A6 */ mfspr r4, 0x1b
+/* 80004868 00001868 7C 60 00 A6 */ mfmsr r3
+/* 8000486C 0000186C 60 63 00 30 */ ori r3, r3, 0x30
+/* 80004870 00001870 7C 7B 03 A6 */ mtspr 0x1b, r3
+/* 80004874 00001874 3C 60 80 0B */ lis r3, TRKInterruptHandler@h
+/* 80004878 00001878 60 63 DE F4 */ ori r3, r3, TRKInterruptHandler@l
+/* 8000487C 0000187C 7C 7A 03 A6 */ mtspr 0x1a, r3
+/* 80004880 00001880 38 60 17 00 */ li r3, 0x1700
+/* 80004884 00001884 4C 00 00 64 */ rfi
+.fill 0x4CC
+
+# Slot 0x1D00(?)
+/* 80004D54 00001D54 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80004D58 00001D58 7C 72 43 A6 */ mtspr 0x112, r3
+/* 80004D5C 00001D5C 7C 93 43 A6 */ mtspr 0x113, r4
+/* 80004D60 00001D60 7C 5A 02 A6 */ mfspr r2, 0x1a
+/* 80004D64 00001D64 7C 9B 02 A6 */ mfspr r4, 0x1b
+/* 80004D68 00001D68 7C 60 00 A6 */ mfmsr r3
+/* 80004D6C 00001D6C 60 63 00 30 */ ori r3, r3, 0x30
+/* 80004D70 00001D70 7C 7B 03 A6 */ mtspr 0x1b, r3
+/* 80004D74 00001D74 3C 60 80 0B */ lis r3, TRKInterruptHandler@h
+/* 80004D78 00001D78 60 63 DE F4 */ ori r3, r3, TRKInterruptHandler@l
+/* 80004D7C 00001D7C 7C 7A 03 A6 */ mtspr 0x1a, r3
+/* 80004D80 00001D80 38 60 1C 00 */ li r3, 0x1c00
+/* 80004D84 00001D84 4C 00 00 64 */ rfi
+.fill 0xCC
+
+# Slot 0x1E00(?)
+/* 80004E54 00001E54 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80004E58 00001E58 7C 72 43 A6 */ mtspr 0x112, r3
+/* 80004E5C 00001E5C 7C 93 43 A6 */ mtspr 0x113, r4
+/* 80004E60 00001E60 7C 5A 02 A6 */ mfspr r2, 0x1a
+/* 80004E64 00001E64 7C 9B 02 A6 */ mfspr r4, 0x1b
+/* 80004E68 00001E68 7C 60 00 A6 */ mfmsr r3
+/* 80004E6C 00001E6C 60 63 00 30 */ ori r3, r3, 0x30
+/* 80004E70 00001E70 7C 7B 03 A6 */ mtspr 0x1b, r3
+/* 80004E74 00001E74 3C 60 80 0B */ lis r3, TRKInterruptHandler@h
+/* 80004E78 00001E78 60 63 DE F4 */ ori r3, r3, TRKInterruptHandler@l
+/* 80004E7C 00001E7C 7C 7A 03 A6 */ mtspr 0x1a, r3
+/* 80004E80 00001E80 38 60 1D 00 */ li r3, 0x1d00
+/* 80004E84 00001E84 4C 00 00 64 */ rfi
+.fill 0xCC
+
+# Slot 0x1F00(?)
+/* 80004F54 00001F54 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80004F58 00001F58 7C 72 43 A6 */ mtspr 0x112, r3
+/* 80004F5C 00001F5C 7C 93 43 A6 */ mtspr 0x113, r4
+/* 80004F60 00001F60 7C 5A 02 A6 */ mfspr r2, 0x1a
+/* 80004F64 00001F64 7C 9B 02 A6 */ mfspr r4, 0x1b
+/* 80004F68 00001F68 7C 60 00 A6 */ mfmsr r3
+/* 80004F6C 00001F6C 60 63 00 30 */ ori r3, r3, 0x30
+/* 80004F70 00001F70 7C 7B 03 A6 */ mtspr 0x1b, r3
+/* 80004F74 00001F74 3C 60 80 0B */ lis r3, TRKInterruptHandler@h
+/* 80004F78 00001F78 60 63 DE F4 */ ori r3, r3, TRKInterruptHandler@l
+/* 80004F7C 00001F7C 7C 7A 03 A6 */ mtspr 0x1a, r3
+/* 80004F80 00001F80 38 60 1E 00 */ li r3, 0x1e00
+/* 80004F84 00001F84 4C 00 00 64 */ rfi
+.fill 0xCC
+
+# Slot 0x2000(?)
+/* 80005054 00002054 7C 51 43 A6 */ mtspr 0x111, r2
+/* 80005058 00002058 7C 72 43 A6 */ mtspr 0x112, r3
+/* 8000505C 0000205C 7C 93 43 A6 */ mtspr 0x113, r4
+/* 80005060 00002060 7C 5A 02 A6 */ mfspr r2, 0x1a
+/* 80005064 00002064 7C 9B 02 A6 */ mfspr r4, 0x1b
+/* 80005068 00002068 7C 60 00 A6 */ mfmsr r3
+/* 8000506C 0000206C 60 63 00 30 */ ori r3, r3, 0x30
+/* 80005070 00002070 7C 7B 03 A6 */ mtspr 0x1b, r3
+/* 80005074 00002074 3C 60 80 0B */ lis r3, TRKInterruptHandler@h
+/* 80005078 00002078 60 63 DE F4 */ ori r3, r3, TRKInterruptHandler@l
+/* 8000507C 0000207C 7C 7A 03 A6 */ mtspr 0x1a, r3
+/* 80005080 00002080 38 60 1F 00 */ li r3, 0x1f00
+/* 80005084 00002084 4C 00 00 64 */ rfi
+.global gTRKInterruptVectorTableEnd
+gTRKInterruptVectorTableEnd:
diff --git a/src/d/actor/d_a_alink.cpp b/src/d/actor/d_a_alink.cpp
index 1ecdbebc2f..bee09a5023 100644
--- a/src/d/actor/d_a_alink.cpp
+++ b/src/d/actor/d_a_alink.cpp
@@ -9780,14 +9780,14 @@ s16 daAlink_c::getRoofAngle(cBgS_PolyInfo* param_0, s16 param_1) {
/* 800B01FC-800B02BC 0AAB3C 00C0+00 2/2 0/0 0/0 .text
* getWallEdgePos__9daAlink_cFRC4cXyzP8cM3dGPlaP8cM3dGPlaP4cXyzi */
-BOOL daAlink_c::getWallEdgePos(cXyz const& param_0, cM3dGPla* param_1, cM3dGPla* param_2,
- cXyz* param_3, int param_4) {
- cXyz sp20(param_1->mNormal.z, 0.0f, -param_1->mNormal.x);
- sp20.normalizeZP();
+BOOL daAlink_c::getWallEdgePos(cXyz const& param_0, cM3dGPla* i_planeA, cM3dGPla* i_planeB,
+ cXyz* o_outVec, int unused) {
+ cXyz normal(i_planeA->mNormal.z, 0.0f, -i_planeA->mNormal.x);
+ normal.normalizeZP();
- cM3dGPla sp2C(&sp20, -((sp20.z * param_0.z) + ((sp20.x * param_0.x) + (sp20.y * param_0.y))));
+ cM3dGPla planeC(&normal, -((normal.z * param_0.z) + ((normal.x * param_0.x) + (normal.y * param_0.y))));
- return cM3d_3PlaneCrossPos(*param_1, *param_2, sp2C, param_3);
+ return cM3d_3PlaneCrossPos(*i_planeA, *i_planeB, planeC, o_outVec);
}
/* 800B02BC-800B146C 0AABFC 11B0+00 9/9 0/0 0/0 .text setFrontWallType__9daAlink_cFv */
@@ -9806,8 +9806,8 @@ void daAlink_c::setFrontWallType() {
if (field_0x2f91 == 0) {
field_0x2f91 = 1;
if (!checkMagneBootsOn()) {
- cXyz sp98;
- cXyz sp8C;
+ cXyz chk_start_pos;
+ cXyz chk_end_pos;
f32 sp64 = cM_ssin(shape_angle.y);
f32 sp60 = cM_scos(shape_angle.y);
@@ -9833,39 +9833,38 @@ void daAlink_c::setFrontWallType() {
}
}
- sp98.x = mHookshotTopPos.x - (sp64 * var_f31);
- sp98.z = mHookshotTopPos.z - (sp60 * var_f31);
- sp8C.x = (2.0f * mHookshotTopPos.x) - sp98.x;
- sp8C.z = (2.0f * mHookshotTopPos.z) - sp98.z;
+ chk_start_pos.x = mHookshotTopPos.x - (sp64 * var_f31);
+ chk_start_pos.z = mHookshotTopPos.z - (sp60 * var_f31);
+ chk_end_pos.x = (2.0f * mHookshotTopPos.x) - chk_start_pos.x;
+ chk_end_pos.z = (2.0f * mHookshotTopPos.z) - chk_start_pos.z;
sp50 = mHookshotTopPos.y;
sp54 = 10.0f + mHookshotTopPos.y;
} else {
- sp98.x = current.pos.x;
- sp98.z = current.pos.z;
- sp8C.x = sp98.x + (sp64 * (25.0f + var_f31));
- sp8C.z = sp98.z + (sp60 * (25.0f + var_f31));
+ chk_start_pos.x = current.pos.x;
+ chk_start_pos.z = current.pos.z;
+ chk_end_pos.x = chk_start_pos.x + (sp64 * (25.0f + var_f31));
+ chk_end_pos.z = chk_start_pos.z + (sp60 * (25.0f + var_f31));
sp50 = current.pos.y;
sp54 = 100.0f + current.pos.y;
}
BOOL sp4C = 0;
-
for (i = 0; i < 3; i++) {
- sp98.y = sp50 + mAcchCir[i].GetWallH();
- sp8C.y = sp98.y;
+ chk_start_pos.y = sp50 + mAcchCir[i].GetWallH();
+ chk_end_pos.y = chk_start_pos.y;
- if (commonLineCheck(&sp98, &sp8C)) {
+ if (commonLineCheck(&chk_start_pos, &chk_end_pos)) {
var_r27 = dComIfG_Bgsp().GetWallCode(mLinkLinChk);
if (i == 0 && var_r27 == 3 && checkStageName("D_MN10") != 0 && fopAcM_GetRoomNo(this) == 6) {
sp4C = 1;
} else if (!checkWolf() && sp5C == 0 && ((i == 0 && mLinkAcch.ChkGroundHit() && !checkModeFlg(0x70C52)) || mProcID == PROC_HOOKSHOT_FLY) && var_r27 == 0) {
sp5C = 1;
- sp98.y = sp54;
- sp8C.y = sp98.y;
+ chk_start_pos.y = sp54;
+ chk_end_pos.y = chk_start_pos.y;
- if (commonLineCheck(&sp98, &sp8C) && checkClimbCode(mLinkLinChk)) {
+ if (commonLineCheck(&chk_start_pos, &chk_end_pos) && checkClimbCode(mLinkLinChk)) {
sp58 = 1;
break;
}
@@ -9883,24 +9882,24 @@ void daAlink_c::setFrontWallType() {
return;
}
- sp98.y = sp50 + mAcchCir[0].GetWallH();
- sp8C.y = sp98.y;
+ chk_start_pos.y = sp50 + mAcchCir[0].GetWallH();
+ chk_end_pos.y = chk_start_pos.y;
- if (!commonLineCheck(&sp98, &sp8C)) {
+ if (!commonLineCheck(&chk_start_pos, &chk_end_pos)) {
return;
}
} else {
sp4C = 0;
}
- cM3dGPla spE0;
- dComIfG_Bgsp().GetTriPla(mLinkLinChk, &spE0);
+ cM3dGPla linchk_tri;
+ dComIfG_Bgsp().GetTriPla(mLinkLinChk, &linchk_tri);
- if ((fabsf(spE0.mNormal.y) > 0.05f)) {
+ if ((fabsf(linchk_tri.mNormal.y) > 0.05f)) {
return;
}
- field_0x306e = spE0.mNormal.atan2sX_Z();
+ field_0x306e = linchk_tri.mNormal.atan2sX_Z();
BOOL sp48 = 0;
s16 spA;
@@ -9926,29 +9925,28 @@ void daAlink_c::setFrontWallType() {
if (checkModeFlg(2)) {
field_0x34ec = mLinkLinChk.i_GetCross();
} else {
- sp40 = spE0.getSignedLenPos(&current.pos);
- field_0x34ec.set(current.pos.x - (sp40 * spE0.mNormal.x), current.pos.y, current.pos.z - (sp40 * spE0.mNormal.z));
+ sp40 = linchk_tri.getSignedLenPos(&current.pos);
+ field_0x34ec.set(current.pos.x - (sp40 * linchk_tri.mNormal.x), current.pos.y, current.pos.z - (sp40 * linchk_tri.mNormal.z));
int temp_r3 = dComIfG_Bgsp().GetWallCode(mLinkLinChk);
if (temp_r3 != 4 && temp_r3 != 5) {
- sp98.x = current.pos.x;
- sp98.z = current.pos.z;
- sp8C.x = sp98.x - (2.0f * sp40 * spE0.mNormal.x);
- sp8C.z = sp98.z - (2.0f * sp40 * spE0.mNormal.z);
+ chk_start_pos.x = current.pos.x;
+ chk_start_pos.z = current.pos.z;
+ chk_end_pos.x = chk_start_pos.x - (2.0f * sp40 * linchk_tri.mNormal.x);
+ chk_end_pos.z = chk_start_pos.z - (2.0f * sp40 * linchk_tri.mNormal.z);
- //int i;
for (i = 0; i < 3; i++) {
if (i == 0 && sp58 != 0) {
- sp98.y = sp54;
+ chk_start_pos.y = sp54;
} else {
- sp98.y = current.pos.y + mAcchCir[i].GetWallH();
+ chk_start_pos.y = current.pos.y + mAcchCir[i].GetWallH();
}
- sp8C.y = sp98.y;
+ chk_end_pos.y = chk_start_pos.y;
- if (commonLineCheck(&sp98, &sp8C)) {
+ if (commonLineCheck(&chk_start_pos, &chk_end_pos)) {
dComIfG_Bgsp().GetTriPla(mLinkLinChk, &spCC);
- cXyz sp80 = spE0.mNormal - spCC.mNormal;
+ cXyz sp80 = linchk_tri.mNormal - spCC.mNormal;
if (sp80.abs() < 0.001f) {
break;
@@ -9976,7 +9974,7 @@ void daAlink_c::setFrontWallType() {
return;
}
- cXyz sp74;
+ cXyz wall_edge_pos;
if (var_r29 != 1 && var_r29 != 5 && var_r29 != 4) {
offNoResetFlg3(FLG3_UNK_400000);
}
@@ -10026,26 +10024,26 @@ void daAlink_c::setFrontWallType() {
sp34 = current.pos.y;
}
- sp98.set(field_0x34ec.x - (15.0f * spE0.mNormal.x), 150.0f + sp34, field_0x34ec.z - (15.0f * spE0.mNormal.z));
- mLinkGndChk.SetPos(&sp98);
+ chk_start_pos.set(field_0x34ec.x - (15.0f * linchk_tri.mNormal.x), 150.0f + sp34, field_0x34ec.z - (15.0f * linchk_tri.mNormal.z));
+ mLinkGndChk.SetPos(&chk_start_pos);
f32 sp38 = dComIfG_Bgsp().GroundCross(&mLinkGndChk);
if (sp38 >= current.pos.y && dBgS_CheckBGroundPoly(mLinkGndChk)) {
cM3dGPla spB8;
dComIfG_Bgsp().GetTriPla(mLinkGndChk, &spB8);
- if (getWallEdgePos(field_0x34ec, &spE0, &spB8, &sp74, 0)) {
- if (sp74.y - sp34 <= 150.0f) {
+ if (getWallEdgePos(field_0x34ec, &linchk_tri, &spB8, &wall_edge_pos, 0)) {
+ if (wall_edge_pos.y - sp34 <= 150.0f) {
if (checkModeFlg(0x40000)) {
- field_0x34ec = sp74;
+ field_0x34ec = wall_edge_pos;
field_0x2f91 = 7;
return;
} else if (mProcID != PROC_HOOKSHOT_FLY) {
- field_0x34ec = sp74;
+ field_0x34ec = wall_edge_pos;
field_0x2f91 = 0xA;
return;
} else {
- current.pos.y = sp74.y - 150.0f;
+ current.pos.y = wall_edge_pos.y - 150.0f;
}
}
}
@@ -10075,40 +10073,40 @@ void daAlink_c::setFrontWallType() {
return;
}
- f32 var_f30;
- f32 sp30;
- f32 sp2C;
- f32 sp28;
+ f32 hang_height;
+ f32 small_jump_height;
+ f32 climb_height;
+ f32 body_height;
if (checkWolf()) {
if (checkModeFlg(2)) {
- var_f30 = daAlinkHIO_wlAutoJump_c0::m.field_0x78;
+ hang_height = daAlinkHIO_wlAutoJump_c0::m.field_0x78;
} else {
- var_f30 = daAlinkHIO_wlWallHang_c0::m.field_0x84;
+ hang_height = daAlinkHIO_wlWallHang_c0::m.field_0x84;
}
- sp30 = daAlinkHIO_wlWallHang_c0::m.field_0x7C;
- sp2C = daAlinkHIO_wlWallHang_c0::m.field_0x80;
+ small_jump_height = daAlinkHIO_wlWallHang_c0::m.field_0x7C;
+ climb_height = daAlinkHIO_wlWallHang_c0::m.field_0x80;
} else {
if (checkModeFlg(2)) {
- var_f30 = daAlinkHIO_autoJump_c0::m.mHangHeightLimit;
+ hang_height = daAlinkHIO_autoJump_c0::m.mHangHeightLimit;
} else {
- var_f30 = daAlinkHIO_wallHang_c0::m.field_0x14;
+ hang_height = daAlinkHIO_wallHang_c0::m.jump_hang_height;
}
- sp30 = daAlinkHIO_wallHang_c0::m.field_0x8;
- sp2C = daAlinkHIO_wallHang_c0::m.field_0xC;
+ small_jump_height = daAlinkHIO_wallHang_c0::m.small_jump_height;
+ climb_height = daAlinkHIO_wallHang_c0::m.climb_height;
}
- sp28 = current.pos.y + mSinkShapeOffset;
- sp98.set(current.pos.x, sp28 + (0.01f + var_f30), current.pos.z);
- sp8C.set(sp98.x + (sp64 * (50.0f + var_f31)), sp98.y, sp98.z + (sp60 * (50.0f + var_f31)));
+ body_height = current.pos.y + mSinkShapeOffset;
+ chk_start_pos.set(current.pos.x, body_height + (0.01f + hang_height), current.pos.z);
+ chk_end_pos.set(chk_start_pos.x + (sp64 * (50.0f + var_f31)), chk_start_pos.y, chk_start_pos.z + (sp60 * (50.0f + var_f31)));
- BOOL sp24 = commonLineCheck(&sp98, &sp8C);
+ BOOL sp24 = commonLineCheck(&chk_start_pos, &chk_end_pos);
if (sp24) {
- sp98 = mLinkLinChk.i_GetCross();
+ chk_start_pos = mLinkLinChk.i_GetCross();
dComIfG_Bgsp().GetTriPla(mLinkLinChk, &spCC);
- sp98.x = (sp98.x + (25.0f * spCC.mNormal.x));
- sp98.z = (sp98.z + (25.0f * spCC.mNormal.z));
- mLinkGndChk.SetPos(&sp98);
+ chk_start_pos.x = (chk_start_pos.x + (25.0f * spCC.mNormal.x));
+ chk_start_pos.z = (chk_start_pos.z + (25.0f * spCC.mNormal.z));
+ mLinkGndChk.SetPos(&chk_start_pos);
if (dComIfG_Bgsp().GroundCross(&mLinkGndChk) > current.pos.y + l_autoUpHeight) {
dComIfG_Bgsp().GetTriPla(mLinkGndChk, &spCC);
@@ -10120,51 +10118,51 @@ void daAlink_c::setFrontWallType() {
if (sp24 == 0) {
mLinkRoofChk.SetPos(current.pos);
- sp24 = dComIfG_Bgsp().RoofChk(&mLinkRoofChk) - sp28 > 10.0f + var_f30 ? 0 : 1;
+ sp24 = dComIfG_Bgsp().RoofChk(&mLinkRoofChk) - body_height > 10.0f + hang_height ? 0 : 1;
}
if (sp24 != 0) {
return;
}
- cM3dGPla spA4;
- bool sp8 = 0;
+ cM3dGPla gndchk_tri;
+ bool found_gnd_tri = false;
int sp20 = 0;
- sp98.set(field_0x34ec.x - (7.5f * spE0.mNormal.x), sp28 + (0.01f + var_f30), field_0x34ec.z - (7.5f * spE0.mNormal.z));
- mLinkGndChk.SetPos(&sp98);
+ chk_start_pos.set(field_0x34ec.x - (7.5f * linchk_tri.mNormal.x), body_height + (0.01f + hang_height), field_0x34ec.z - (7.5f * linchk_tri.mNormal.z));
+ mLinkGndChk.SetPos(&chk_start_pos);
f32 sp1C = dComIfG_Bgsp().GroundCross(&mLinkGndChk);
- sp98.set(field_0x34ec.x - (1.5f * spE0.mNormal.x), sp28 + (0.01f + var_f30), field_0x34ec.z - (1.5f * spE0.mNormal.z));
- mLinkGndChk.SetPos(&sp98);
+ chk_start_pos.set(field_0x34ec.x - (1.5f * linchk_tri.mNormal.x), body_height + (0.01f + hang_height), field_0x34ec.z - (1.5f * linchk_tri.mNormal.z));
+ mLinkGndChk.SetPos(&chk_start_pos);
f32 sp38 = dComIfG_Bgsp().GroundCross(&mLinkGndChk);
if (-1000000000.0f != sp38 && fabsf(sp1C - sp38) < l_autoUpHeight) {
- sp8 = dComIfG_Bgsp().GetTriPla(mLinkGndChk, &spA4);
+ found_gnd_tri = dComIfG_Bgsp().GetTriPla(mLinkGndChk, &gndchk_tri);
}
- if ((!checkModeFlg(0x40000) && sp38 < sp28) || sp8 == 0) {
+ if ((!checkModeFlg(0x40000) && sp38 < body_height) || !found_gnd_tri) {
return;
}
- if (-1000000000.0f == sp38 || !cBgW_CheckBGround(spA4.mNormal.y)) {
+ if (-1000000000.0f == sp38 || !cBgW_CheckBGround(gndchk_tri.mNormal.y)) {
return;
}
- if (!getWallEdgePos(field_0x34ec, &spE0, &spA4, &sp74, sp20)) {
+ if (!getWallEdgePos(field_0x34ec, &linchk_tri, &gndchk_tri, &wall_edge_pos, sp20)) {
return;
}
if (dComIfG_Bgsp().GetGroundCode(mLinkGndChk) != 6) {
f32 sp18 = 36.5f;
- sp98.set(sp74.x + (10.0f * spE0.mNormal.x), sp74.y + l_autoUpHeight, sp74.z + (10.0f * spE0.mNormal.z));
- sp8C.set(sp74.x - (spE0.mNormal.x * sp18), sp98.y, sp74.z - (spE0.mNormal.z * sp18));
+ chk_start_pos.set(wall_edge_pos.x + (10.0f * linchk_tri.mNormal.x), wall_edge_pos.y + l_autoUpHeight, wall_edge_pos.z + (10.0f * linchk_tri.mNormal.z));
+ chk_end_pos.set(wall_edge_pos.x - (linchk_tri.mNormal.x * sp18), chk_start_pos.y, wall_edge_pos.z - (linchk_tri.mNormal.z * sp18));
- if (commonLineCheck(&sp98, &sp8C)) {
+ if (commonLineCheck(&chk_start_pos, &chk_end_pos)) {
return;
}
}
- field_0x34ec = sp74;
- f32 temp_f29 = field_0x34ec.y - sp28;
+ field_0x34ec = wall_edge_pos;
+ f32 temp_f29 = field_0x34ec.y - body_height;
if (checkModeFlg(0x40000)) {
f32 sp14;
@@ -10185,19 +10183,19 @@ void daAlink_c::setFrontWallType() {
}
}
} else if (checkModeFlg(2)) {
- if (sp38 - mLinkAcch.GetGroundH() > field_0x598 && temp_f29 < var_f30) {
+ if (sp38 - mLinkAcch.GetGroundH() > field_0x598 && temp_f29 < hang_height) {
if (!checkWolf() && mProcID != PROC_HOOKSHOT_FLY && temp_f29 < daAlinkHIO_autoJump_c0::m.mGrabHeightLimit) {
field_0x2f91 = 0xB;
} else {
field_0x2f91 = 0xA;
}
}
- } else if (!(temp_f29 >= 0.01f + var_f30) && (!checkGrabAnime() || !(temp_f29 >= 0.01f + sp30))) {
- if (temp_f29 < 0.01f + sp30) {
+ } else if (!(temp_f29 >= 0.01f + hang_height) && (!checkGrabAnime() || !(temp_f29 >= 0.01f + small_jump_height))) {
+ if (temp_f29 < 0.01f + small_jump_height) {
field_0x2f91 = 6;
- } else if (temp_f29 < 0.01f + sp2C) {
+ } else if (temp_f29 < 0.01f + climb_height) {
field_0x2f91 = 7;
- } else if (checkWolf() || (temp_f29 < 0.01f + daAlinkHIO_wallHang_c0::m.field_0x10)) {
+ } else if (checkWolf() || (temp_f29 < 0.01f + daAlinkHIO_wallHang_c0::m.jump_climb_height)) {
field_0x2f91 = 8;
} else {
field_0x2f91 = 9;
@@ -12199,7 +12197,7 @@ BOOL daAlink_c::checkAutoJumpAction() {
}
}
- if (!checkEndResetFlg0(ERFLG0_NOT_HANG) && mSpecialMode != 0x2B && var_r29 && dComIfG_Bgsp().GetWallCode(mLinkLinChk) != 2 && sp28 < -daAlinkHIO_wallHang_c0::m.field_0x18 && current.pos.y - mWaterY > sp18 && (fabsf(sp44.mNormal.y) <= 0.05f || (sp44.mNormal.y < 0.05f && var_r27 && getWallEdgePos(mLinkLinChk.i_GetCross(), &sp44, &sp58, mLinkLinChk.GetCrossP(), 0)))) {
+ if (!checkEndResetFlg0(ERFLG0_NOT_HANG) && mSpecialMode != 0x2B && var_r29 && dComIfG_Bgsp().GetWallCode(mLinkLinChk) != 2 && sp28 < -daAlinkHIO_wallHang_c0::m.hang_foot_pos_height && current.pos.y - mWaterY > sp18 && (fabsf(sp44.mNormal.y) <= 0.05f || (sp44.mNormal.y < 0.05f && var_r27 && getWallEdgePos(mLinkLinChk.i_GetCross(), &sp44, &sp58, mLinkLinChk.GetCrossP(), 0)))) {
current.pos.x = mLinkLinChk.i_GetCross().x;
current.pos.z = mLinkLinChk.i_GetCross().z;
@@ -12358,7 +12356,7 @@ BOOL daAlink_c::checkFrontWallTypeAction() {
field_0x3078 = var_r27 + 1;
if (field_0x2f91 == 6) {
- if (field_0x3078 > daAlinkHIO_wallHang_c0::m.field_0x0) {
+ if (field_0x3078 > daAlinkHIO_wallHang_c0::m.small_jump_input_time) {
if (checkWolf()) {
return procWolfStepMoveInit();
} else {
@@ -12366,7 +12364,7 @@ BOOL daAlink_c::checkFrontWallTypeAction() {
}
}
} else if (field_0x2f91 == 7 || field_0x2f91 == 8 || field_0x2f91 == 9) {
- if (field_0x3078 > daAlinkHIO_wallHang_c0::m.field_0x2) {
+ if (field_0x3078 > daAlinkHIO_wallHang_c0::m.grab_input_time) {
if (checkWolf()) {
if (field_0x2f91 == 7 || field_0x2f91 == 8) {
if (checkModeFlg(0x40000)) {
diff --git a/src/d/actor/d_a_alink_hang.inc b/src/d/actor/d_a_alink_hang.inc
index 60708ea237..1f1afb1552 100644
--- a/src/d/actor/d_a_alink_hang.inc
+++ b/src/d/actor/d_a_alink_hang.inc
@@ -197,7 +197,7 @@ void daAlink_c::setHangGroundY() {
int daAlink_c::changeHangEndProc() {
setHangGroundY();
- if (current.pos.y < field_0x33d8 + daAlinkHIO_wallHang_c0::m.field_0x18 - 1.0f &&
+ if (current.pos.y < field_0x33d8 + daAlinkHIO_wallHang_c0::m.hang_foot_pos_height - 1.0f &&
(mProcID != PROC_HANG_FALL_START || !(mUnderFrameCtrl->getFrame() < 3.0f)) &&
field_0x33d8 < current.pos.y - 5.0f)
{
diff --git a/src/d/actor/d_a_alink_wolf.inc b/src/d/actor/d_a_alink_wolf.inc
index bb87105aa9..8e9d9aceb5 100644
--- a/src/d/actor/d_a_alink_wolf.inc
+++ b/src/d/actor/d_a_alink_wolf.inc
@@ -434,7 +434,7 @@ void daAlink_c::changeLink(int param_0) {
mLinkAcch.SetRoofCrrHeight(field_0x598);
field_0x594 = daAlinkHIO_move_c0::m.mMaxSpeed;
- l_autoUpHeight = daAlinkHIO_wallHang_c0::m.field_0x4 + 0.01f;
+ l_autoUpHeight = daAlinkHIO_wallHang_c0::m.auto_walk_height + 0.01f;
l_autoDownHeight = -l_autoUpHeight;
field_0x3470 = cM_scos(cM_deg2s(daAlinkHIO_slide_c0::m.mSlideAngle));
field_0x3122 = cM_deg2s(daAlinkHIO_slide_c0::m.mClimbAngle);
diff --git a/src/d/actor/d_a_e_pz.cpp b/src/d/actor/d_a_e_pz.cpp
index 5d027c1148..93e20bf78c 100644
--- a/src/d/actor/d_a_e_pz.cpp
+++ b/src/d/actor/d_a_e_pz.cpp
@@ -4,2557 +4,2702 @@
*/
#include "d/actor/d_a_e_pz.h"
-#include "dol2asm.h"
-#include "d/d_camera.h"
+#include "d/d_com_inf_game.h"
+#include "d/actor/d_a_player.h"
+#include "d/d_debug_viewer.h"
+#include "d/d_s_play.h"
+#include "c/c_damagereaction.h"
+#include "Z2AudioLib/Z2Instances.h"
+
UNK_REL_DATA;
#include "f_op/f_op_actor_enemy.h"
-
-//
-// Forward References:
-//
-
-extern "C" void __ct__12daE_PZ_HIO_cFv();
-extern "C" void draw__8daE_PZ_cFv();
-extern "C" static void daE_PZ_Draw__FP8daE_PZ_c();
-extern "C" void setBck__8daE_PZ_cFiUcff();
-extern "C" void setActionMode__8daE_PZ_cFii();
-extern "C" void mEntrySUB__8daE_PZ_cFb();
-extern "C" void mPzScaleSet__8daE_PZ_cFb();
-extern "C" void mEnemyScaleSet__8daE_PZ_cFv();
-extern "C" void getCutType__8daE_PZ_cFv();
-extern "C" void mSetFirePos__8daE_PZ_cFv();
-extern "C" void damage_check__8daE_PZ_cFv();
-extern "C" static void s_PointSearch__FPvPv();
-extern "C" void executeSearchPoint__8daE_PZ_cFv();
-extern "C" void executeOpeningDemo__8daE_PZ_cFv();
-extern "C" void checkSkipEdge__14dEvt_control_cFv();
-extern "C" void mPointerSet__8daE_PZ_cFv();
-extern "C" void executeWait__8daE_PZ_cFv();
-extern "C" void executeAttack__8daE_PZ_cFv();
-extern "C" void executeDamage__8daE_PZ_cFv();
-extern "C" void executeDead__8daE_PZ_cFv();
-extern "C" void executeSummonsBullet__8daE_PZ_cFv();
-extern "C" void executeBullet__8daE_PZ_cFv();
-extern "C" void action__8daE_PZ_cFv();
-extern "C" void action_fire__8daE_PZ_cFv();
-extern "C" void fire_mtx_set__8daE_PZ_cFv();
-extern "C" void mtx_set__8daE_PZ_cFv();
-extern "C" void cc_set__8daE_PZ_cFv();
-extern "C" void execute__8daE_PZ_cFv();
-extern "C" static void daE_PZ_Execute__FP8daE_PZ_c();
-extern "C" static bool daE_PZ_IsDelete__FP8daE_PZ_c();
-extern "C" void _delete__8daE_PZ_cFv();
-extern "C" static void daE_PZ_Delete__FP8daE_PZ_c();
-extern "C" void CreateHeap__8daE_PZ_cFv();
-extern "C" void __dt__12J3DFrameCtrlFv();
-extern "C" static void useHeapInit__FP10fopAc_ac_c();
-extern "C" void create__8daE_PZ_cFv();
-extern "C" void __ct__8daE_PZ_cFv();
-extern "C" void __dt__8cM3dGSphFv();
-extern "C" void __dt__8cM3dGCylFv();
-extern "C" void __dt__8cM3dGAabFv();
-extern "C" void __dt__10dCcD_GSttsFv();
-extern "C" void __dt__12dBgS_ObjAcchFv();
-extern "C" void __dt__12dBgS_AcchCirFv();
-extern "C" void __ct__4cXyzFv();
-extern "C" static void daE_PZ_Create__FP8daE_PZ_c();
-extern "C" void __dt__10cCcD_GSttsFv();
-extern "C" void __dt__12daE_PZ_HIO_cFv();
-extern "C" void __sinit_d_a_e_pz_cpp();
-extern "C" static void func_80760CE4();
-extern "C" static void func_80760CEC();
-extern "C" void __dt__4cXyzFv();
-extern "C" void changeDemoMoveAngle__9daPy_py_cFs(fopAc_ac_c* param_0, u16 param_1);
-extern "C" void zero__4cXyzFv();
-extern "C" static void dComIfGp_particle_set__FUsPC4cXyzPC5csXyzPC4cXyz();
-extern "C" void isStop__13mDoExt_morf_cFv();
-extern "C" void checkNowWolf__9daPy_py_cFv();
-extern "C" static void fopAcM_onSwitch__FPC10fopAc_ac_ci();
-extern "C" void abs__4cXyzCFv();
-extern "C" void changeDemoPos0__9daPy_py_cFPC4cXyz();
-extern "C" static void fopAcM_searchPlayerAngleY__FPC10fopAc_ac_c();
-extern "C" void setFrame__13mDoExt_morf_cFf();
-extern "C" void set__4cXyzFRC3Vec();
-extern "C" void set__4cXyzFfff();
-extern "C" void changeDemoMode__9daPy_py_cFUliis();
-extern "C" void changeOriginalDemo__9daPy_py_cFv();
-extern "C" static void daPy_getPlayerActorClass__Fv();
-extern "C" void __as__4cXyzFRC4cXyz();
-extern "C" static void dComIfGp_getPlayer__Fi();
-extern "C" static void dComIfGp_getCamera__Fi();
-extern "C" static void dComIfGp_getPlayerCameraID__Fi();
-extern "C" void __ct__4cXyzFRC4cXyz();
-extern "C" void __ct__4cXyzFfff();
-extern "C" extern char const* const d_a_e_pz__stringBase0;
-
-//
-// External References:
-//
-
-extern "C" void mDoMtx_XrotM__FPA4_fs();
-extern "C" void mDoMtx_YrotS__FPA4_fs();
-extern "C" void transM__14mDoMtx_stack_cFfff();
-extern "C" void scaleM__14mDoMtx_stack_cFfff();
-extern "C" void ZXYrotM__14mDoMtx_stack_cFRC5csXyz();
-extern "C" void play__14mDoExt_baseAnmFv();
-extern "C" void init__13mDoExt_btkAnmFP16J3DMaterialTableP19J3DAnmTextureSRTKeyiifss();
-extern "C" void entry__13mDoExt_btkAnmFP16J3DMaterialTablef();
-extern "C" void init__13mDoExt_brkAnmFP16J3DMaterialTableP15J3DAnmTevRegKeyiifss();
-extern "C" void entry__13mDoExt_brkAnmFP16J3DMaterialTablef();
-extern "C" void mDoExt_modelUpdateDL__FP8J3DModel();
-extern "C" void
-__ct__16mDoExt_McaMorfSOFP12J3DModelDataP25mDoExt_McaMorfCallBack1_cP25mDoExt_McaMorfCallBack2_cP15J3DAnmTransformifiiP10Z2CreatureUlUl();
-extern "C" void setAnm__16mDoExt_McaMorfSOFP15J3DAnmTransformiffff();
-extern "C" void play__16mDoExt_McaMorfSOFUlSc();
-extern "C" void entryDL__16mDoExt_McaMorfSOFv();
-extern "C" void modelCalc__16mDoExt_McaMorfSOFv();
-extern "C" void mDoExt_J3DModel__create__FP12J3DModelDataUlUl();
-extern "C" void __ct__10fopAc_ac_cFv();
-extern "C" void fopAc_IsActor__FPv();
-extern "C" void fopAcM_SearchByID__FUiPP10fopAc_ac_c();
-extern "C" void fopAcM_delete__FP10fopAc_ac_c();
-extern "C" void fopAcM_create__FsUlPC4cXyziPC5csXyzPC4cXyzSc();
-extern "C" void fopAcM_createChild__FsUiUlPC4cXyziPC5csXyzPC4cXyzScPFPv_i();
-extern "C" void fopAcM_entrySolidHeap__FP10fopAc_ac_cPFP10fopAc_ac_c_iUl();
-extern "C" void fopAcM_SetMin__FP10fopAc_ac_cfff();
-extern "C" void fopAcM_SetMax__FP10fopAc_ac_cfff();
-extern "C" void fopAcM_posMoveF__FP10fopAc_ac_cPC4cXyz();
-extern "C" void fopAcM_searchActorAngleY__FPC10fopAc_ac_cPC10fopAc_ac_c();
-extern "C" void fopAcM_searchActorAngleX__FPC10fopAc_ac_cPC10fopAc_ac_c();
-extern "C" void fopAcM_orderPotentialEvent__FP10fopAc_ac_cUsUsUs();
-extern "C" void fopAcM_setEffectMtx__FPC10fopAc_ac_cPC12J3DModelData();
-extern "C" void fpcEx_Search__FPFPvPv_PvPv();
-extern "C" void dStage_changeScene__FifUlScsi();
-extern "C" void dComIfG_resLoad__FP30request_of_phase_process_classPCc();
-extern "C" void dComIfG_resDelete__FP30request_of_phase_process_classPCc();
-extern "C" void dComIfGp_getReverb__Fi();
-extern "C" void
-dComIfGd_setShadow__FUlScP8J3DModelP4cXyzffffR13cBgS_PolyInfoP12dKy_tevstr_csfP9_GXTexObj();
-extern "C" void onSwitch__12dSv_danBit_cFi();
-extern "C" void onSwitch__10dSv_info_cFii();
-extern "C" void offSwitch__10dSv_info_cFii();
-extern "C" void isSwitch__10dSv_info_cCFii();
-extern "C" void getRes__14dRes_control_cFPCclP11dRes_info_ci();
-extern "C" void reset__14dEvt_control_cFv();
-extern "C" void reset__14dEvt_control_cFPv();
-extern "C" void dEv_noFinishSkipProc__FPvi();
-extern "C" void setSkipProc__14dEvt_control_cFPvPFPvi_ii();
-extern "C" void getEmitter__Q213dPa_control_c7level_cFUl();
-extern "C" void
-set__13dPa_control_cFUcUsPC4cXyzPC12dKy_tevstr_cPC5csXyzPC4cXyzUcP18dPa_levelEcallBackScPC8_GXColorPC8_GXColorPC4cXyzf();
-extern "C" void
-set__13dPa_control_cFUlUcUsPC4cXyzPC12dKy_tevstr_cPC5csXyzPC4cXyzUcP18dPa_levelEcallBackScPC8_GXColorPC8_GXColorPC4cXyzf();
-extern "C" void __ct__12dBgS_AcchCirFv();
-extern "C" void SetWall__12dBgS_AcchCirFff();
-extern "C" void __dt__9dBgS_AcchFv();
-extern "C" void __ct__9dBgS_AcchFv();
-extern "C" void Set__9dBgS_AcchFP4cXyzP4cXyzP10fopAc_ac_ciP12dBgS_AcchCirP4cXyzP5csXyzP5csXyz();
-extern "C" void CrrPos__9dBgS_AcchFR4dBgS();
-extern "C" void SetGroundUpY__9dBgS_AcchFf();
-extern "C" void SetObj__16dBgS_PolyPassChkFv();
-extern "C" void __ct__10dCcD_GSttsFv();
-extern "C" void Move__10dCcD_GSttsFv();
-extern "C" void Init__9dCcD_SttsFiiP10fopAc_ac_c();
-extern "C" void __ct__12dCcD_GObjInfFv();
-extern "C" void ChkAtHit__12dCcD_GObjInfFv();
-extern "C" void ChkTgHit__12dCcD_GObjInfFv();
-extern "C" void GetTgHitObj__12dCcD_GObjInfFv();
-extern "C" void Set__8dCcD_CylFRC11dCcD_SrcCyl();
-extern "C" void Set__8dCcD_SphFRC11dCcD_SrcSph();
-extern "C" void cc_at_check__FP10fopAc_ac_cP11dCcU_AtInfo();
-extern "C" void Start__9dCamera_cFv();
-extern "C" void Stop__9dCamera_cFv();
-extern "C" void SetTrimSize__9dCamera_cFl();
-extern "C" void Set__9dCamera_cF4cXyz4cXyz();
-extern "C" void Reset__9dCamera_cF4cXyz4cXyz();
-extern "C" void StartBlure__9dCamera_cFiP10fopAc_ac_cff();
-extern "C" void dCam_getBody__Fv();
-extern "C" void settingTevStruct__18dScnKy_env_light_cFiP4cXyzP12dKy_tevstr_c();
-extern "C" void setLightTevColorType_MAJI__18dScnKy_env_light_cFP12J3DModelDataP12dKy_tevstr_c();
-extern "C" void dKy_darkworld_check__Fv();
-extern "C" void Set__4cCcSFP8cCcD_Obj();
-extern "C" void __mi__4cXyzCFRC3Vec();
-extern "C" void atan2sX_Z__4cXyzCFv();
-extern "C" void cM_atan2s__Fff();
-extern "C" void cM_rnd__Fv();
-extern "C" void cM_rndF__Ff();
-extern "C" void __dt__13cBgS_PolyInfoFv();
-extern "C" void __dt__8cM3dGCirFv();
-extern "C" void SetC__8cM3dGCylFRC4cXyz();
-extern "C" void SetH__8cM3dGCylFf();
-extern "C" void SetR__8cM3dGCylFf();
-extern "C" void SetC__8cM3dGSphFRC4cXyz();
-extern "C" void SetR__8cM3dGSphFf();
-extern "C" void cLib_addCalc2__FPffff();
-extern "C" void cLib_addCalc0__FPfff();
-extern "C" void cLib_addCalcPos__FP4cXyzRC4cXyzfff();
-extern "C" void cLib_addCalcAngleS2__FPssss();
-extern "C" void MtxPosition__FP4cXyzP4cXyz();
-extern "C" void seStart__7Z2SeMgrF10JAISoundIDPC3VecUlScffffUc();
-extern "C" void seStartLevel__7Z2SeMgrF10JAISoundIDPC3VecUlScffffUc();
-extern "C" void subBgmStart__8Z2SeqMgrFUl();
-extern "C" void subBgmStop__8Z2SeqMgrFv();
-extern "C" void bgmStreamPrepare__8Z2SeqMgrFUl();
-extern "C" void bgmStreamPlay__8Z2SeqMgrFv();
-extern "C" void bgmStreamStop__8Z2SeqMgrFUl();
-extern "C" void __ct__15Z2CreatureEnemyFv();
-extern "C" void init__15Z2CreatureEnemyFP3VecP3VecUcUc();
-extern "C" void* __nw__FUl();
-extern "C" void __dl__FPv();
-extern "C" void init__12J3DFrameCtrlFs();
-extern "C" void __construct_array();
-extern "C" void _savegpr_19();
-extern "C" void _savegpr_23();
-extern "C" void _savegpr_24();
-extern "C" void _savegpr_26();
-extern "C" void _savegpr_27();
-extern "C" void _savegpr_28();
-extern "C" void _savegpr_29();
-extern "C" void _restgpr_19();
-extern "C" void _restgpr_23();
-extern "C" void _restgpr_24();
-extern "C" void _restgpr_26();
-extern "C" void _restgpr_27();
-extern "C" void _restgpr_28();
-extern "C" void _restgpr_29();
-extern "C" extern void* __vt__8dCcD_Sph[36];
-extern "C" extern void* __vt__8dCcD_Cyl[36];
-extern "C" extern void* __vt__9dCcD_Stts[11];
-extern "C" extern void* __vt__12cCcD_SphAttr[25];
-extern "C" extern void* __vt__12cCcD_CylAttr[25];
-extern "C" extern void* __vt__14cCcD_ShapeAttr[22];
-extern "C" extern void* __vt__9cCcD_Stts[8];
-extern "C" u8 now__14mDoMtx_stack_c[48];
-extern "C" u8 mSimpleTexObj__21dDlst_shadowControl_c[32];
-extern "C" extern u8 struct_80450C98[4];
-extern "C" u8 m_midnaActor__9daPy_py_c[4];
-extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
-extern "C" void __register_global_object();
-
-//
-// Declarations:
-//
-
-/* ############################################################################################## */
-/* 80761528-8076152C 00002C 0004+00 0/6 0/0 0/0 .rodata @3927 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_3927 = 10.0f;
-COMPILER_STRIP_GATE(0x80761528, &lit_3927);
-#pragma pop
-
-/* 8076152C-80761530 000030 0004+00 0/1 0/0 0/0 .rodata @3928 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_3928 = 35.0f;
-COMPILER_STRIP_GATE(0x8076152C, &lit_3928);
-#pragma pop
-
-/* 80761530-80761534 000034 0004+00 1/8 0/0 0/0 .rodata @3929 */
-SECTION_RODATA static f32 const lit_3929 = 3.0f;
-COMPILER_STRIP_GATE(0x80761530, &lit_3929);
-
+namespace {
/* 807617F4-80761838 000038 0044+00 0/1 0/0 0/0 .data cc_pz_src__22@unnamed@d_a_e_pz_cpp@
*/
-#pragma push
-#pragma force_active on
-SECTION_DATA static u8 data_807617F4[68] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0xD8, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x75,
- 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x42, 0x48, 0x00, 0x00, 0x43, 0x96, 0x00, 0x00,
+static dCcD_SrcCyl cc_pz_src = {
+ {
+ {0x0, {{0x0, 0x0, 0x0}, {0xD8080002, 0x43}, 0x75}}, // mObj
+ {dCcD_SE_13, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
+ {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x402}, // mGObjTg
+ {0x0}, // mGObjCo
+ }, // mObjInf
+ {
+ {0.0f, 0.0f, 0.0f}, // mCenter
+ 50.0f, // mRadius
+ 300.0f // mHeight
+ } // mCyl
};
-#pragma pop
/* 80761838-80761878 00007C 0040+00 0/1 0/0 0/0 .data cc_pz_at_src__22@unnamed@d_a_e_pz_cpp@ */
-#pragma push
-#pragma force_active on
-SECTION_DATA static u8 data_80761838[64] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D,
- 0xD8, 0xFB, 0xFD, 0xFF, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00,
+static dCcD_SrcSph cc_pz_at_src = {
+ {
+ {0x0, {{0x400, 0x2, 0xD}, {0xD8FBFDFF, 0x43}, 0x0}}, // mObj
+ {dCcD_SE_13, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
+ {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
+ {0x0}, // mGObjCo
+ }, // mObjInf
+ {
+ {{0.0f, 0.0f, 0.0f}, 40.0f} // mSph
+ } // mSphAttr
};
-#pragma pop
/* 80761878-807618BC 0000BC 0044+00 0/1 0/0 0/0 .data cc_pz_wp_src__22@unnamed@d_a_e_pz_cpp@ */
-#pragma push
-#pragma force_active on
-SECTION_DATA static u8 data_80761878[68] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x41, 0x60, 0x80, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
- 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x20, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x42, 0x48, 0x00, 0x00, 0x43, 0x96, 0x00, 0x00,
-};
-#pragma pop
-
-/* 807618BC-80761958 -00001 009C+00 1/1 0/0 0/0 .data @4194 */
-SECTION_DATA static void* lit_4194[39] = {
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x58),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x48),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x48),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x48),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x50),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x40),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x50),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x48),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x30),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x58),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x40),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x58),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x58),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x58),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x58),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x58),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x58),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x58),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x58),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x40),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x40),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x58),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x38),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x38),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x30),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x58),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x40),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x58),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x58),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x58),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x40),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x40),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x40),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x50),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x50),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x50),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x58),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x50),
- (void*)(((char*)getCutType__8daE_PZ_cFv) + 0x48),
-};
-
-/* 80761958-80761B6C -00001 0214+00 1/1 0/0 0/0 .data @5018 */
-SECTION_DATA static void* lit_5018[133] = {
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x7E4),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x800),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x9EC),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0xA7C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0xB6C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0xB90),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0xBD8),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0xC68),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0xCDC),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0xD8C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0xDE8),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0xF50),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0xFDC),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x1130),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x11AC),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x12AC),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x145C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x1594),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x7E4),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x800),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x1918),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x1988),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x19E0),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x1A88),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x1AA8),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x1C48),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x1C74),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x1C94),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x1EDC),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x1F84),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x2124),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x2184),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x2230),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0xD8C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0xE64),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0xF50),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0xFDC),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x1130),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x11AC),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x231C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x1298),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x145C),
- (void*)(((char*)executeOpeningDemo__8daE_PZ_cFv) + 0x1564),
-};
-
-/* 80761B6C-80761BF0 -00001 0084+00 1/1 0/0 0/0 .data @5481 */
-SECTION_DATA static void* lit_5481[33] = {
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0x74),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0x110),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0x210),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0xC9C),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0xC9C),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0xC9C),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0xC9C),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0xC9C),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0xC9C),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0xC9C),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0x330),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0x370),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0x3AC),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0xC9C),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0xC9C),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0xC9C),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0xC9C),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0xC9C),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0xC9C),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0xC9C),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0x538),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0xF8),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0x264),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0xC9C),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0xC9C),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0xC9C),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0xC9C),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0xC9C),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0xC9C),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0xC9C),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0x330),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0x370),
- (void*)(((char*)executeWait__8daE_PZ_cFv) + 0x3AC),
-};
-
-/* 80761BF0-80761BF8 000434 0006+02 1/1 0/0 0/0 .data eff_delete_id$5688 */
-SECTION_DATA static u8 eff_delete_id[6 + 2 /* padding */] = {
- 0x88,
- 0x9E,
- 0x88,
- 0x9F,
- 0x88,
- 0xA0,
- /* padding */
- 0x00,
- 0x00,
-};
-
-/* 80761BF8-80761C28 -00001 0030+00 1/1 0/0 0/0 .data @5981 */
-SECTION_DATA static void* lit_5981[12] = {
- (void*)(((char*)executeDead__8daE_PZ_cFv) + 0x204),
- (void*)(((char*)executeDead__8daE_PZ_cFv) + 0x428),
- (void*)(((char*)executeDead__8daE_PZ_cFv) + 0x5E4),
- (void*)(((char*)executeDead__8daE_PZ_cFv) + 0x6F4),
- (void*)(((char*)executeDead__8daE_PZ_cFv) + 0xA78),
- (void*)(((char*)executeDead__8daE_PZ_cFv) + 0xA78),
- (void*)(((char*)executeDead__8daE_PZ_cFv) + 0xA78),
- (void*)(((char*)executeDead__8daE_PZ_cFv) + 0xA78),
- (void*)(((char*)executeDead__8daE_PZ_cFv) + 0xA78),
- (void*)(((char*)executeDead__8daE_PZ_cFv) + 0xA78),
- (void*)(((char*)executeDead__8daE_PZ_cFv) + 0x204),
- (void*)(((char*)executeDead__8daE_PZ_cFv) + 0x894),
-};
-
-/* 80761C28-80761C2C 00046C 0004+00 0/0 0/0 0/0 .data eff_seed_id */
-#pragma push
-#pragma force_active on
-SECTION_DATA static u32 eff_seed_id = 0x88A388A4;
-#pragma pop
-
-/* 80761C2C-80761C34 000470 0006+02 0/1 0/0 0/0 .data eff_summonBall_id */
-#pragma push
-#pragma force_active on
-SECTION_DATA static u8 eff_summonBall_id[6 + 2 /* padding */] = {
- 0x88,
- 0x98,
- 0x88,
- 0x99,
- 0x88,
- 0x9A,
- /* padding */
- 0x00,
- 0x00,
-};
-#pragma pop
-
-/* 80761C34-80761C38 000478 0004+00 0/1 0/0 0/0 .data eff_summonBall2_id */
-#pragma push
-#pragma force_active on
-SECTION_DATA static u32 eff_summonBall2_id = 0x89138914;
-#pragma pop
-
-/* 80761C38-80761C3C 00047C 0004+00 0/0 0/0 0/0 .data eff_summonShoot2_id */
-#pragma push
-#pragma force_active on
-SECTION_DATA static u32 eff_summonShoot2_id = 0x89118912;
-#pragma pop
-
-/* 80761C3C-80761CC4 -00001 0088+00 1/1 0/0 0/0 .data @6713 */
-SECTION_DATA static void* lit_6713[34] = {
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0xB0),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0x3BC),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0x8A4),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0xBFC),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0xCAC),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0x1758),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0x1758),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0x1758),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0x1758),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0x1758),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0xD04),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0xD7C),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0x1758),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0x1758),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0x1758),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0x1758),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0x1758),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0x1758),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0x1758),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0x1758),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0x126C),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0x1424),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0xBB8),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0x1758),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0x1758),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0x1758),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0x1758),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0x1758),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0x1758),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0x1758),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0x8A4),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0xBB8),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0xBFC),
- (void*)(((char*)executeSummonsBullet__8daE_PZ_cFv) + 0xCCC),
-};
-
-/* 80761CC4-80761CCC 000508 0006+02 1/1 0/0 0/0 .data eff_bullet_id$6717 */
-SECTION_DATA static u8 eff_bullet_id[6 + 2 /* padding */] = {
- 0x88,
- 0x66,
- 0x88,
- 0x67,
- 0x88,
- 0x68,
- /* padding */
- 0x00,
- 0x00,
-};
-
-/* 80761CCC-80761CD4 000510 0008+00 1/1 0/0 0/0 .data eff_bullet_delete_id$6718 */
-SECTION_DATA static u8 eff_bullet_delete_id[8] = {
- 0x88, 0x62, 0x88, 0x63, 0x88, 0x64, 0x88, 0x65,
-};
-
-/* 80761CD4-80761CD8 000518 0004+00 1/1 0/0 0/0 .data eff_darkHoll_id$6837 */
-SECTION_DATA static u8 eff_darkHoll_id[4] = {
- 0x84,
- 0xA6,
- 0x84,
- 0xA7,
-};
-
-/* 80761CD8-80761CE0 00051C 0008+00 1/1 0/0 0/0 .data mPzDarkHoll_dt$6994 */
-SECTION_DATA static u8 mPzDarkHoll_dt[8] = {
- 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x20,
-};
-
-/* 80761CE0-80761D00 -00001 0020+00 1/0 0/0 0/0 .data l_daE_PZ_Method */
-static actor_method_class l_daE_PZ_Method = {
- (process_method_func)daE_PZ_Create__FP8daE_PZ_c,
- (process_method_func)daE_PZ_Delete__FP8daE_PZ_c,
- (process_method_func)daE_PZ_Execute__FP8daE_PZ_c,
- (process_method_func)daE_PZ_IsDelete__FP8daE_PZ_c,
- (process_method_func)daE_PZ_Draw__FP8daE_PZ_c,
-};
-
-/* 80761D00-80761D30 -00001 0030+00 0/0 0/0 1/0 .data g_profile_E_PZ */
-extern actor_process_profile_definition g_profile_E_PZ = {
- fpcLy_CURRENT_e, // mLayerID
- 7, // mListID
- fpcPi_CURRENT_e, // mListPrio
- PROC_E_PZ, // mProcName
- &g_fpcLf_Method.base, // sub_method
- sizeof(daE_PZ_c), // mSize
- 0, // mSizeOther
- 0, // mParameters
- &g_fopAc_Method.base, // sub_method
- 175, // mPriority
- &l_daE_PZ_Method, // sub_method
- 0x00040100, // mStatus
- fopAc_ENEMY_e, // mActorType
- fopAc_CULLBOX_CUSTOM_e, // cullType
-};
-
-/* 80761D30-80761D3C 000574 000C+00 1/1 0/0 0/0 .data __vt__12dBgS_AcchCir */
-SECTION_DATA extern void* __vt__12dBgS_AcchCir[3] = {
- (void*)NULL /* RTTI */,
- (void*)NULL,
- (void*)__dt__12dBgS_AcchCirFv,
-};
-
-/* 80761D3C-80761D48 000580 000C+00 2/2 0/0 0/0 .data __vt__10cCcD_GStts */
-SECTION_DATA extern void* __vt__10cCcD_GStts[3] = {
- (void*)NULL /* RTTI */,
- (void*)NULL,
- (void*)__dt__10cCcD_GSttsFv,
-};
-
-/* 80761D48-80761D54 00058C 000C+00 1/1 0/0 0/0 .data __vt__10dCcD_GStts */
-SECTION_DATA extern void* __vt__10dCcD_GStts[3] = {
- (void*)NULL /* RTTI */,
- (void*)NULL,
- (void*)__dt__10dCcD_GSttsFv,
-};
-
-/* 80761D54-80761D60 000598 000C+00 2/2 0/0 0/0 .data __vt__8cM3dGSph */
-SECTION_DATA extern void* __vt__8cM3dGSph[3] = {
- (void*)NULL /* RTTI */,
- (void*)NULL,
- (void*)__dt__8cM3dGSphFv,
-};
-
-/* 80761D60-80761D6C 0005A4 000C+00 2/2 0/0 0/0 .data __vt__8cM3dGCyl */
-SECTION_DATA extern void* __vt__8cM3dGCyl[3] = {
- (void*)NULL /* RTTI */,
- (void*)NULL,
- (void*)__dt__8cM3dGCylFv,
-};
-
-/* 80761D6C-80761D78 0005B0 000C+00 2/2 0/0 0/0 .data __vt__8cM3dGAab */
-SECTION_DATA extern void* __vt__8cM3dGAab[3] = {
- (void*)NULL /* RTTI */,
- (void*)NULL,
- (void*)__dt__8cM3dGAabFv,
-};
-
-/* 80761D78-80761D9C 0005BC 0024+00 2/2 0/0 0/0 .data __vt__12dBgS_ObjAcch */
-SECTION_DATA extern void* __vt__12dBgS_ObjAcch[9] = {
- (void*)NULL /* RTTI */,
- (void*)NULL,
- (void*)__dt__12dBgS_ObjAcchFv,
- (void*)NULL,
- (void*)NULL,
- (void*)func_80760CEC,
- (void*)NULL,
- (void*)NULL,
- (void*)func_80760CE4,
-};
-
-/* 80761D9C-80761DA8 0005E0 000C+00 2/2 0/0 0/0 .data __vt__12J3DFrameCtrl */
-SECTION_DATA extern void* __vt__12J3DFrameCtrl[3] = {
- (void*)NULL /* RTTI */,
- (void*)NULL,
- (void*)__dt__12J3DFrameCtrlFv,
-};
-
-/* 80761DA8-80761DB4 0005EC 000C+00 2/2 0/0 0/0 .data __vt__12daE_PZ_HIO_c */
-SECTION_DATA extern void* __vt__12daE_PZ_HIO_c[3] = {
- (void*)NULL /* RTTI */,
- (void*)NULL,
- (void*)__dt__12daE_PZ_HIO_cFv,
+static dCcD_SrcCyl cc_pz_wp_src = {
+ {
+ {0x0, {{0x0, 0x0, 0x0}, {0x416080, 0x3}, 0x0}}, // mObj
+ {dCcD_SE_13, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
+ {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x20A6}, // mGObjTg
+ {0x0}, // mGObjCo
+ }, // mObjInf
+ {
+ {0.0f, 0.0f, 0.0f}, // mCenter
+ 50.0f, // mRadius
+ 300.0f // mHeight
+ } // mCyl
};
+}
/* 8075856C-807585BC 0000EC 0050+00 1/1 0/0 0/0 .text __ct__12daE_PZ_HIO_cFv */
daE_PZ_HIO_c::daE_PZ_HIO_c() {
- // NONMATCHING
+ no = -1;
+ body_model_size = 1.0f;
+ portal_model_size = 10.0f;
+ bullet_speed = 35.0f;
+ weapon_hit_warp_speed = 3.0f;
+ after_attack_wait_time = 60;
+ blur_start_timing = 40;
}
-/* ############################################################################################## */
-/* 80761534-80761538 000038 0004+00 0/1 0/0 0/0 .rodata @4040 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4040 = 800.0f;
-COMPILER_STRIP_GATE(0x80761534, &lit_4040);
-#pragma pop
-
/* 807585BC-807587E0 00013C 0224+00 1/1 0/0 0/0 .text draw__8daE_PZ_cFv */
-void daE_PZ_c::draw() {
- // NONMATCHING
+int daE_PZ_c::draw() {
+ if (field_0x840 != 0) {
+ return 1;
+ }
+
+ if (arg0 == 10) {
+#ifdef DEBUG
+ if (WREG_S(0) != 0) {
+ GXColor color;
+ color.r = 0xFF;
+ color.g = 0x82;
+ color.b = 0x82;
+ color.a = 0xFA;
+ dDbVw_drawCircleXlu(home.pos, 100.0f, color, TRUE, 12);
+ }
+#endif
+ return 1;
+ }
+
+ if (arg0 == 30 || arg0 == 40) {
+ return 1;
+ }
+
+ if (arg0 >= 20 && arg0 <= 23) {
+ if (field_0x842 != 0) {
+ dComIfGd_setListDark();
+ mpPortalBtk->entry(mpPortalModel->getModelData());
+ mpPortalBrk[field_0x5d8]->entry(mpPortalModel->getModelData());
+ mDoExt_modelUpdateDL(mpPortalModel);
+ dComIfGd_setList();
+ } else {
+ mpBallBrk->entry(mpBallModelMorf->getModel()->getModelData());
+ mpBallModelMorf->entryDL();
+ }
+ return 1;
+ }
+
+ if (attention_info.distances[fopAc_attn_BATTLE_e] == 0) {
+ return 1;
+ }
+
+ J3DModel* model_p = mpModelMorf->getModel();
+
+ g_env_light.settingTevStruct(0, &current.pos, &tevStr);
+ g_env_light.setLightTevColorType_MAJI(model_p, &tevStr);
+
+ fopAcM_setEffectMtx(this, model_p->getModelData());
+ mpPzBrk->entry(model_p->getModelData());
+ mpPzBtk->entry(model_p->getModelData());
+ mpModelMorf->entryDL();
+
+ cXyz spC;
+ spC.set(current.pos.x, 10.0f + current.pos.y, current.pos.z);
+ mShadowKey = dComIfGd_setShadow(mShadowKey, 1, model_p, &spC, 800.0f + BREG_F(18), BREG_F(19), current.pos.y, mAcch.GetGroundH(), mAcch.m_gnd, &tevStr, 0, 1.0f, dDlst_shadowControl_c::getSimpleTex());
+ return 1;
}
/* 807587E0-80758800 000360 0020+00 1/0 0/0 0/0 .text daE_PZ_Draw__FP8daE_PZ_c */
-static void daE_PZ_Draw(daE_PZ_c* param_0) {
- // NONMATCHING
+static int daE_PZ_Draw(daE_PZ_c* i_this) {
+ return i_this->draw();
}
-/* ############################################################################################## */
-/* 80761538-8076153C 00003C 0004+00 1/6 0/0 0/0 .rodata @4050 */
-SECTION_RODATA static f32 const lit_4050 = -1.0f;
-COMPILER_STRIP_GATE(0x80761538, &lit_4050);
-
-/* 807617B4-807617B4 0002B8 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
-#pragma push
-#pragma force_active on
-SECTION_DEAD static char const* const stringBase_807617B4 = "E_PZ";
-#pragma pop
-
/* 80758800-807588AC 000380 00AC+00 6/6 0/0 0/0 .text setBck__8daE_PZ_cFiUcff */
-void daE_PZ_c::setBck(int param_0, u8 param_1, f32 param_2, f32 param_3) {
- // NONMATCHING
+void daE_PZ_c::setBck(int i_anm, u8 i_mode, f32 i_morf, f32 i_speed) {
+ mpModelMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("E_PZ", i_anm), i_mode, i_morf, i_speed, 0.0f, -1.0f);
+ mAnm = i_anm;
}
/* 807588AC-807588B8 00042C 000C+00 7/7 0/0 0/0 .text setActionMode__8daE_PZ_cFii */
-void daE_PZ_c::setActionMode(int param_0, int param_1) {
- // NONMATCHING
+void daE_PZ_c::setActionMode(int i_action, int i_mode) {
+ mActionMode = i_action;
+ mMoveMode = i_mode;
}
/* 807588B8-80758A94 000438 01DC+00 4/4 0/0 0/0 .text mEntrySUB__8daE_PZ_cFb */
void daE_PZ_c::mEntrySUB(bool param_0) {
- // NONMATCHING
-}
+ cXyz eff_pos;
+ eff_pos.set(current.pos);
+ eff_pos.y += field_0x7c0;
+
+ if (!param_0) {
+ if ((arg0 == 0 || arg0 == 1) && field_0x844 == 0) {
+ dComIfGp_particle_set(0x88A1, &eff_pos, &shape_angle, NULL);
+ field_0x5dc.startCreatureSound(Z2SE_EN_PZ_DISAPPEAR, 0, -1);
+ field_0x844 = 1;
+ }
+
+ attention_info.distances[fopAc_attn_BATTLE_e] = 0;
+ fopAcM_OffStatus(this, 0);
+ attention_info.flags &= ~4;
+ } else {
+ if ((arg0 == 0 || arg0 == 1) && field_0x844 != 0) {
+ dComIfGp_particle_set(0x8897, &eff_pos, &shape_angle, NULL);
+ field_0x5dc.startCreatureSound(Z2SE_EN_PZ_EMERGE, 0, -1);
+ field_0x844 = 0;
+ }
+
+ attention_info.distances[fopAc_attn_BATTLE_e] = 3;
+ fopAcM_OnStatus(this, 0);
+ attention_info.flags |= 4;
+ }
+}
+
+UNK_REL_BSS;
+
+/* 80761DFD 0003+00 l_initHIO None */
+static u8 l_initHIO;
-/* ############################################################################################## */
-/* 8076153C-80761540 000040 0004+00 0/2 0/0 0/0 .rodata @4115 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4115 = 7.0f / 10.0f;
-COMPILER_STRIP_GATE(0x8076153C, &lit_4115);
-#pragma pop
-
-/* 80761540-80761544 000044 0004+00 0/3 0/0 0/0 .rodata @4116 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4116 = 4.0f / 5.0f;
-COMPILER_STRIP_GATE(0x80761540, &lit_4116);
-#pragma pop
-
-/* 80761544-80761548 000048 0004+00 1/3 0/0 0/0 .rodata @4117 */
-SECTION_RODATA static f32 const lit_4117 = 2.0f;
-COMPILER_STRIP_GATE(0x80761544, &lit_4117);
-
-/* 80761548-8076154C 00004C 0004+00 0/1 0/0 0/0 .rodata @4118 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4118 = 1.0f / 10.0f;
-COMPILER_STRIP_GATE(0x80761548, &lit_4118);
-#pragma pop
-
-/* 80761DC0-80761DC4 000008 0001+03 3/3 0/0 0/0 .bss @1109 */
-static u8 lit_1109[1 + 3 /* padding */];
-
-/* 80761DC4-80761DC8 00000C 0001+03 0/0 0/0 0/0 .bss @1107 */
-#pragma push
-#pragma force_active on
-static u8 lit_1107[1 + 3 /* padding */];
-#pragma pop
-
-/* 80761DC8-80761DCC 000010 0001+03 0/0 0/0 0/0 .bss @1105 */
-#pragma push
-#pragma force_active on
-static u8 lit_1105[1 + 3 /* padding */];
-#pragma pop
-
-/* 80761DCC-80761DD0 000014 0001+03 0/0 0/0 0/0 .bss @1104 */
-#pragma push
-#pragma force_active on
-static u8 lit_1104[1 + 3 /* padding */];
-#pragma pop
-
-/* 80761DD0-80761DD4 000018 0001+03 0/0 0/0 0/0 .bss @1099 */
-#pragma push
-#pragma force_active on
-static u8 lit_1099[1 + 3 /* padding */];
-#pragma pop
-
-/* 80761DD4-80761DD8 00001C 0001+03 0/0 0/0 0/0 .bss @1097 */
-#pragma push
-#pragma force_active on
-static u8 lit_1097[1 + 3 /* padding */];
-#pragma pop
-
-/* 80761DD8-80761DDC 000020 0001+03 0/0 0/0 0/0 .bss @1095 */
-#pragma push
-#pragma force_active on
-static u8 lit_1095[1 + 3 /* padding */];
-#pragma pop
-
-/* 80761DDC-80761DE0 000024 0001+03 0/0 0/0 0/0 .bss @1094 */
-#pragma push
-#pragma force_active on
-static u8 lit_1094[1 + 3 /* padding */];
-#pragma pop
-
-/* 80761DE0-80761DE4 000028 0001+03 0/0 0/0 0/0 .bss @1057 */
-#pragma push
-#pragma force_active on
-static u8 lit_1057[1 + 3 /* padding */];
-#pragma pop
-
-/* 80761DE4-80761DE8 00002C 0001+03 0/0 0/0 0/0 .bss @1055 */
-#pragma push
-#pragma force_active on
-static u8 lit_1055[1 + 3 /* padding */];
-#pragma pop
-
-/* 80761DE8-80761DEC 000030 0001+03 0/0 0/0 0/0 .bss @1053 */
-#pragma push
-#pragma force_active on
-static u8 lit_1053[1 + 3 /* padding */];
-#pragma pop
-
-/* 80761DEC-80761DF0 000034 0001+03 0/0 0/0 0/0 .bss @1052 */
-#pragma push
-#pragma force_active on
-static u8 lit_1052[1 + 3 /* padding */];
-#pragma pop
-
-/* 80761DF0-80761DF4 000038 0001+03 0/0 0/0 0/0 .bss @1014 */
-#pragma push
-#pragma force_active on
-static u8 lit_1014[1 + 3 /* padding */];
-#pragma pop
-
-/* 80761DF4-80761DF8 00003C 0001+03 0/0 0/0 0/0 .bss @1012 */
-#pragma push
-#pragma force_active on
-static u8 lit_1012[1 + 3 /* padding */];
-#pragma pop
-
-/* 80761DF8-80761DFC 000040 0001+03 0/0 0/0 0/0 .bss @1010 */
-#pragma push
-#pragma force_active on
-static u8 lit_1010[1 + 3 /* padding */];
-#pragma pop
-
-/* 80761DFC-80761E00 -00001 0004+00 2/2 0/0 0/0 .bss None */
-/* 80761DFC 0001+00 data_80761DFC @1009 */
-/* 80761DFD 0003+00 data_80761DFD None */
-static u8 struct_80761DFC[4];
-
-/* 80761E00-80761E0C 000048 000C+00 1/1 0/0 0/0 .bss @3922 */
-static u8 lit_3922[12];
-
-/* 80761E0C-80761E2C -00001 0020+00 10/12 0/0 0/0 .bss None */
/* 80761E0C 001C+01 data_80761E0C l_HIO */
+static daE_PZ_HIO_c l_HIO;
+
/* 80761E29 0003+00 data_80761E29 None */
-static u8 struct_80761E0C[32];
+static u8 data_80761E28;
+static u8 data_80761E29;
/* 80758A94-80758BA0 000614 010C+00 3/3 0/0 0/0 .text mPzScaleSet__8daE_PZ_cFb */
-void daE_PZ_c::mPzScaleSet(bool param_0) {
- // NONMATCHING
-}
+bool daE_PZ_c::mPzScaleSet(bool param_0) {
+ if (!param_0) {
+ cLib_addCalc2(&mPzScale.x, l_HIO.body_model_size, 0.7f, 1.0f);
+ cLib_addCalc2(&mPzScale.y, l_HIO.body_model_size, 0.8f, 2.0f);
+ cLib_addCalc2(&mPzScale.z, l_HIO.body_model_size, 0.7f, 1.0f);
+
+ if (fabsf(mPzScale.y - l_HIO.body_model_size) > 0.1f) {
+ return false;
+ }
+ } else {
+ cLib_addCalc0(&mPzScale.x, 0.7f, 1.0f);
+ cLib_addCalc2(&mPzScale.y, field_0x7cc, 0.8f, 2.0f);
+ cLib_addCalc0(&mPzScale.z, 0.7f, 1.0f);
+
+ if (fabsf(mPzScale.y - field_0x7cc) > 0.1f) {
+ return false;
+ }
+ }
-/* ############################################################################################## */
-/* 8076154C-80761550 000050 0004+00 0/3 0/0 0/0 .rodata @4159 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4159 = 5.0f;
-COMPILER_STRIP_GATE(0x8076154C, &lit_4159);
-#pragma pop
-
-/* 80761550-80761554 000054 0004+00 0/1 0/0 0/0 .rodata @4160 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4160 = 1.0f / 5.0f;
-COMPILER_STRIP_GATE(0x80761550, &lit_4160);
-#pragma pop
+ return true;
+}
/* 80758BA0-80758D44 000720 01A4+00 1/1 0/0 0/0 .text mEnemyScaleSet__8daE_PZ_cFv */
void daE_PZ_c::mEnemyScaleSet() {
- // NONMATCHING
+ if ((field_0x84c >= 7 || health <= 1) && (field_0x7d8 == 2 || health <= 1)) {
+ for (int i = 0; i < 25; i++) {
+ fopAc_ac_c* spC;
+ if (field_0x7dc[i] != 0 && fopAcM_SearchByID(field_0x7dc[i], &spC) && spC != NULL) {
+ fopAcM_OnStatus(spC, 0x4000);
+
+ if (field_0x7d8 == 2 && field_0x843 == 0) {
+ Z2GetAudioMgr()->seStart(Z2SE_EN_PZ_DKBB_VANISH, &spC->current.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
+ }
+
+ cLib_addCalc0(&spC->scale.x, 0.7f, 1.0f);
+ cLib_addCalc2(&spC->scale.y, 5.0f, 0.8f, 2.0f);
+ cLib_addCalc0(&spC->scale.z, 0.7f, 1.0f);
+ if (spC->scale.x > 0.2f && field_0x84c < 10) {
+ continue;
+ }
+
+ daPy_getPlayerActorClass()->offDkCaught2();
+ fopAcM_delete(spC);
+ }
+
+ field_0x7dc[i] = 0;
+ }
+
+ field_0x843 = 1;
+ }
}
/* 80758D44-80758DA4 0008C4 0060+00 2/1 0/0 0/0 .text getCutType__8daE_PZ_cFv */
-void daE_PZ_c::getCutType() {
- // NONMATCHING
+u8 daE_PZ_c::getCutType() {
+ switch(daPy_getPlayerActorClass()->getCutType()) {
+ case daPy_py_c::CUT_TYPE_TURN_RIGHT:
+ case daPy_py_c::CUT_TYPE_LARGE_TURN_RIGHT:
+ return 5;
+ case daPy_py_c::CUT_TYPE_TURN_LEFT:
+ case daPy_py_c::CUT_TYPE_LARGE_TURN_LEFT:
+ return 6;
+ case daPy_py_c::CUT_TYPE_HEAD_JUMP:
+ case daPy_py_c::CUT_TYPE_JUMP:
+ case daPy_py_c::CUT_TYPE_LARGE_JUMP:
+ case daPy_py_c::CUT_TYPE_LARGE_JUMP_FINISH:
+ case daPy_py_c::CUT_TYPE_MORTAL_DRAW_A:
+ case daPy_py_c::CUT_TYPE_TWIRL:
+ case daPy_py_c::CUT_TYPE_MORTAL_DRAW_B:
+ case daPy_py_c::CUT_TYPE_FINISH_STAB:
+ return 4;
+ case daPy_py_c::CUT_TYPE_NM_VERTICAL:
+ case daPy_py_c::CUT_TYPE_NM_STAB:
+ case daPy_py_c::CUT_TYPE_NM_RIGHT:
+ case daPy_py_c::CUT_TYPE_FINISH_VERTICAL:
+ case daPy_py_c::CUT_TYPE_DASH_UNK_26:
+ return 1;
+ case daPy_py_c::CUT_TYPE_NM_LEFT:
+ case daPy_py_c::CUT_TYPE_FINISH_LEFT:
+ case daPy_py_c::CUT_TYPE_COMBO_STAB:
+ case daPy_py_c::CUT_TYPE_HORSE_UNK_22:
+ case daPy_py_c::CUT_TYPE_HORSE_UNK_23:
+ case daPy_py_c::CUT_TYPE_DASH_UNK_25:
+ return 2;
+ default:
+ return 3;
+ }
}
/* 80758DA4-80758E04 000924 0060+00 1/1 0/0 0/0 .text mSetFirePos__8daE_PZ_cFv */
void daE_PZ_c::mSetFirePos() {
- // NONMATCHING
+ fopAc_ac_c* parent;
+ if (fopAcM_SearchByID(parentActorID, &parent) && parent != NULL) {
+ parent->current.pos.set(field_0x7a8);
+ }
}
/* 80758E04-8075923C 000984 0438+00 1/1 0/0 0/0 .text damage_check__8daE_PZ_cFv */
void daE_PZ_c::damage_check() {
- // NONMATCHING
+ if (field_0x7d1 != 0 || mAnm == 0x13 || mPzScale.y != l_HIO.body_model_size || health <= 1) {
+ mBombArrowHit = false;
+ return;
+ }
+
+ daPy_getPlayerActorClass()->onBossRoomWait();
+
+ cXyz bind_eff_pos;
+ mDoMtx_stack_c::copy(mpModelMorf->getModel()->getAnmMtx(1));
+ mDoMtx_stack_c::multVecZero(&bind_eff_pos);
+ scale.set(l_HIO.body_model_size, l_HIO.body_model_size, l_HIO.body_model_size);
+ setMidnaBindEffect(this, &field_0x5dc, &bind_eff_pos, &scale);
+
+ if (mWarpCylCollider.ChkTgHit() || mBombArrowHit) {
+ mWarpCylCollider.ClrTgHit();
+ field_0x7d1 = 10;
+ field_0x7d3 = 0;
+ setBck(0x13, 0, 0.0f, l_HIO.weapon_hit_warp_speed);
+ mBombArrowHit = false;
+ mColliderStts.Move();
+ setActionMode(ACTION_WAIT_e, 11);
+ return;
+ }
+
+ if (mCylCollider.ChkTgHit()) {
+ mAtInfo.mpCollider = mCylCollider.GetTgHitObj();
+ if (mActionMode != ACTION_DAMAGE_e) {
+ field_0x790.set(current.pos);
+ }
+
+ cc_at_check(this, &mAtInfo);
+ field_0x7d1 = 10;
+
+ if (health > 1) {
+ if (mCylCollider.GetTgHitObj()->ChkAtType(AT_TYPE_ARROW) || mCylCollider.GetTgHitObj()->ChkAtType(AT_TYPE_BOMB) || mCylCollider.GetTgHitObj()->ChkAtType(AT_TYPE_BOOMERANG) || mCylCollider.GetTgHitObj()->ChkAtType(AT_TYPE_HOOKSHOT)) {
+ field_0x848 = 0;
+ field_0x7d1 = 35;
+ field_0x847 = 4;
+ setActionMode(ACTION_DAMAGE_e, 0);
+ } else {
+ field_0x847++;
+ if (getCutType() == 4 || mCylCollider.GetTgHitObj()->ChkAtType(AT_TYPE_WOLF_CUT_TURN) || mCylCollider.GetTgHitObj()->ChkAtType(AT_TYPE_MIDNA_LOCK)) {
+ field_0x7d1 = 4;
+ field_0x847 = 4;
+ field_0x848 = 0;
+ } else if (field_0x848 == 0) {
+ field_0x848 = getCutType();
+ if (field_0x848 == 3) {
+ field_0x848 = ((int)cM_rndF(2.0f) & 1) + 2;
+ }
+
+ if (field_0x848 == 5 || field_0x848 == 6) {
+ field_0x7d1 = 4;
+ field_0x847 = 4;
+ field_0x848 = ((int)cM_rndF(2.0f) & 1) + 2;
+ }
+
+ if (field_0x848 == 1) {
+ field_0x848 = 2;
+ } else {
+ field_0x848 = 3;
+ }
+ } else {
+ field_0x848 ^= 1;
+ }
+
+ setActionMode(ACTION_DAMAGE_e, field_0x848);
+ }
+ } else {
+ health = 0;
+
+ for (int i = 0; i < 25; i++) {
+ fopAc_ac_c* sp8;
+ if (field_0x7dc[i] != 0 && fopAcM_SearchByID(field_0x7dc[i], &sp8) && sp8 != NULL) {
+ fopAcM_OnStatus(sp8, 0x4000);
+ }
+ }
+
+ Z2GetAudioMgr()->subBgmStop();
+
+ if (arg0 == 0) {
+ setActionMode(ACTION_DEAD_e, 0);
+ } else {
+ setActionMode(ACTION_DEAD_e, 10);
+ }
+ }
+ }
+
+
+ mCylCollider.ClrTgHit();
+ mColliderStts.Move();
}
/* 8075923C-807592F4 000DBC 00B8+00 1/1 0/0 0/0 .text s_PointSearch__FPvPv */
-static void s_PointSearch(void* param_0, void* param_1) {
- // NONMATCHING
-}
+static void* s_PointSearch(void* i_actor, void* i_data) {
+ if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_E_PZ && ((daE_PZ_c*)i_actor)->arg0 == 10) {
+ ((daE_PZ_c*)i_data)->mPointPos[((daE_PZ_c*)i_data)->mPointNum].set(((daE_PZ_c*)i_actor)->current.pos);
+ ((daE_PZ_c*)i_data)->field_0x780[((daE_PZ_c*)i_data)->mPointNum] = (fopAcM_GetParam(i_actor) & 0xFF00) >> 8;
-/* ############################################################################################## */
-/* 80761554-8076155C 000058 0008+00 2/2 0/0 0/0 .rodata @4333 */
-SECTION_RODATA static u8 const lit_4333[8] = {
- 0x43, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-COMPILER_STRIP_GATE(0x80761554, &lit_4333);
+ ((daE_PZ_c*)i_data)->mPointNum++;
+ if (((daE_PZ_c*)i_data)->mPointNum >= 10) {
+ ((daE_PZ_c*)i_data)->mPointNum = 0;
+ }
+ }
+
+ return NULL;
+}
/* 807592F4-807593CC 000E74 00D8+00 1/1 0/0 0/0 .text executeSearchPoint__8daE_PZ_cFv */
void daE_PZ_c::executeSearchPoint() {
- // NONMATCHING
-}
+ if (field_0x7d3 == 0) {
+ Z2GetAudioMgr()->subBgmStart(Z2BGM_P_ZANT);
+ mPointNum = 0;
+ fpcM_Search(s_PointSearch, this);
-/* ############################################################################################## */
-/* 8076155C-80761560 000060 0004+00 0/1 0/0 0/0 .rodata @4925 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4925 = -50.0f;
-COMPILER_STRIP_GATE(0x8076155C, &lit_4925);
-#pragma pop
-
-/* 80761560-80761564 000064 0004+00 0/1 0/0 0/0 .rodata @4926 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4926 = -3150.0f;
-COMPILER_STRIP_GATE(0x80761560, &lit_4926);
-#pragma pop
-
-/* 80761564-80761568 000068 0004+00 0/1 0/0 0/0 .rodata @4927 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4927 = -3140.0f;
-COMPILER_STRIP_GATE(0x80761564, &lit_4927);
-#pragma pop
-
-/* 80761568-8076156C 00006C 0004+00 0/1 0/0 0/0 .rodata @4928 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4928 = 105.0f;
-COMPILER_STRIP_GATE(0x80761568, &lit_4928);
-#pragma pop
-
-/* 8076156C-80761570 000070 0004+00 0/1 0/0 0/0 .rodata @4929 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4929 = 70.0f;
-COMPILER_STRIP_GATE(0x8076156C, &lit_4929);
-#pragma pop
-
-/* 80761570-80761574 000074 0004+00 0/1 0/0 0/0 .rodata @4930 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4930 = -2950.0f;
-COMPILER_STRIP_GATE(0x80761570, &lit_4930);
-#pragma pop
-
-/* 80761574-80761578 000078 0004+00 0/1 0/0 0/0 .rodata @4931 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4931 = -65.0f;
-COMPILER_STRIP_GATE(0x80761574, &lit_4931);
-#pragma pop
-
-/* 80761578-8076157C 00007C 0004+00 0/1 0/0 0/0 .rodata @4932 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4932 = 270.0f;
-COMPILER_STRIP_GATE(0x80761578, &lit_4932);
-#pragma pop
-
-/* 8076157C-80761580 000080 0004+00 0/1 0/0 0/0 .rodata @4933 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4933 = -3200.0f;
-COMPILER_STRIP_GATE(0x8076157C, &lit_4933);
-#pragma pop
-
-/* 80761580-80761584 000084 0004+00 0/1 0/0 0/0 .rodata @4934 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4934 = -95.0f;
-COMPILER_STRIP_GATE(0x80761580, &lit_4934);
-#pragma pop
-
-/* 80761584-80761588 000088 0004+00 0/1 0/0 0/0 .rodata @4935 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4935 = 180.0f;
-COMPILER_STRIP_GATE(0x80761584, &lit_4935);
-#pragma pop
-
-/* 80761588-8076158C 00008C 0004+00 0/1 0/0 0/0 .rodata @4936 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4936 = -3100.0f;
-COMPILER_STRIP_GATE(0x80761588, &lit_4936);
-#pragma pop
-
-/* 8076158C-80761590 000090 0004+00 0/1 0/0 0/0 .rodata @4937 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4937 = -20.0f;
-COMPILER_STRIP_GATE(0x8076158C, &lit_4937);
-#pragma pop
-
-/* 80761590-80761594 000094 0004+00 0/3 0/0 0/0 .rodata @4938 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4938 = 30.0f;
-COMPILER_STRIP_GATE(0x80761590, &lit_4938);
-#pragma pop
-
-/* 80761594-80761598 000098 0004+00 0/1 0/0 0/0 .rodata @4939 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4939 = -1590.0f;
-COMPILER_STRIP_GATE(0x80761594, &lit_4939);
-#pragma pop
-
-/* 80761598-8076159C 00009C 0004+00 0/1 0/0 0/0 .rodata @4940 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4940 = -110.0f;
-COMPILER_STRIP_GATE(0x80761598, &lit_4940);
-#pragma pop
-
-/* 8076159C-807615A0 0000A0 0004+00 0/1 0/0 0/0 .rodata @4941 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4941 = 170.0f;
-COMPILER_STRIP_GATE(0x8076159C, &lit_4941);
-#pragma pop
-
-/* 807615A0-807615A4 0000A4 0004+00 0/1 0/0 0/0 .rodata @4942 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4942 = -940.0f;
-COMPILER_STRIP_GATE(0x807615A0, &lit_4942);
-#pragma pop
-
-/* 807615A4-807615A8 0000A8 0004+00 0/1 0/0 0/0 .rodata @4943 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4943 = -60.0f;
-COMPILER_STRIP_GATE(0x807615A4, &lit_4943);
-#pragma pop
-
-/* 807615A8-807615AC 0000AC 0004+00 0/1 0/0 0/0 .rodata @4944 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4944 = 560.0f;
-COMPILER_STRIP_GATE(0x807615A8, &lit_4944);
-#pragma pop
-
-/* 807615AC-807615B0 0000B0 0004+00 0/1 0/0 0/0 .rodata @4945 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4945 = -1420.0f;
-COMPILER_STRIP_GATE(0x807615AC, &lit_4945);
-#pragma pop
-
-/* 807615B0-807615B4 0000B4 0004+00 0/1 0/0 0/0 .rodata @4946 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4946 = -157.0f;
-COMPILER_STRIP_GATE(0x807615B0, &lit_4946);
-#pragma pop
-
-/* 807615B4-807615B8 0000B8 0004+00 0/1 0/0 0/0 .rodata @4947 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4947 = 128.0f;
-COMPILER_STRIP_GATE(0x807615B4, &lit_4947);
-#pragma pop
-
-/* 807615B8-807615BC 0000BC 0004+00 0/1 0/0 0/0 .rodata @4948 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4948 = -3260.0f;
-COMPILER_STRIP_GATE(0x807615B8, &lit_4948);
-#pragma pop
-
-/* 807615BC-807615C0 0000C0 0004+00 0/2 0/0 0/0 .rodata @4949 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4949 = 150.0f;
-COMPILER_STRIP_GATE(0x807615BC, &lit_4949);
-#pragma pop
-
-/* 807615C0-807615C4 0000C4 0004+00 0/1 0/0 0/0 .rodata @4950 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4950 = -3050.0f;
-COMPILER_STRIP_GATE(0x807615C0, &lit_4950);
-#pragma pop
-
-/* 807615C4-807615C8 0000C8 0004+00 0/1 0/0 0/0 .rodata @4951 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4951 = 125.0f;
-COMPILER_STRIP_GATE(0x807615C4, &lit_4951);
-#pragma pop
-
-/* 807615C8-807615CC 0000CC 0004+00 0/1 0/0 0/0 .rodata @4952 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4952 = -2710.0f;
-COMPILER_STRIP_GATE(0x807615C8, &lit_4952);
-#pragma pop
-
-/* 807615CC-807615D0 0000D0 0004+00 0/1 0/0 0/0 .rodata @4953 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4953 = 380.0f;
-COMPILER_STRIP_GATE(0x807615CC, &lit_4953);
-#pragma pop
-
-/* 807615D0-807615D4 0000D4 0004+00 0/1 0/0 0/0 .rodata @4954 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4954 = -2515.0f;
-COMPILER_STRIP_GATE(0x807615D0, &lit_4954);
-#pragma pop
-
-/* 807615D4-807615D8 0000D8 0004+00 0/4 0/0 0/0 .rodata @4955 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4955 = 300.0f;
-COMPILER_STRIP_GATE(0x807615D4, &lit_4955);
-#pragma pop
-
-/* 807615D8-807615DC 0000DC 0004+00 0/1 0/0 0/0 .rodata @4956 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4956 = -2960.0f;
-COMPILER_STRIP_GATE(0x807615D8, &lit_4956);
-#pragma pop
-
-/* 807615DC-807615E0 0000E0 0004+00 0/1 0/0 0/0 .rodata @4957 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4957 = -15.0f;
-COMPILER_STRIP_GATE(0x807615DC, &lit_4957);
-#pragma pop
-
-/* 807615E0-807615E4 0000E4 0004+00 0/2 0/0 0/0 .rodata @4958 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4958 = 200.0f;
-COMPILER_STRIP_GATE(0x807615E0, &lit_4958);
-#pragma pop
-
-/* 807615E4-807615E8 0000E8 0004+00 0/1 0/0 0/0 .rodata @4959 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4959 = -3160.0f;
-COMPILER_STRIP_GATE(0x807615E4, &lit_4959);
-#pragma pop
-
-/* 807615E8-807615EC 0000EC 0004+00 0/1 0/0 0/0 .rodata @4960 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4960 = -10.0f;
-COMPILER_STRIP_GATE(0x807615E8, &lit_4960);
-#pragma pop
-
-/* 807615EC-807615F0 0000F0 0004+00 0/1 0/0 0/0 .rodata @4961 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4961 = 120.0f;
-COMPILER_STRIP_GATE(0x807615EC, &lit_4961);
-#pragma pop
-
-/* 807615F0-807615F4 0000F4 0004+00 0/1 0/0 0/0 .rodata @4962 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4962 = -3010.0f;
-COMPILER_STRIP_GATE(0x807615F0, &lit_4962);
-#pragma pop
-
-/* 807615F4-807615F8 0000F8 0004+00 0/1 0/0 0/0 .rodata @4963 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4963 = -1120.0f;
-COMPILER_STRIP_GATE(0x807615F4, &lit_4963);
-#pragma pop
-
-/* 807615F8-807615FC 0000FC 0004+00 0/1 0/0 0/0 .rodata @4964 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4964 = -210.0f;
-COMPILER_STRIP_GATE(0x807615F8, &lit_4964);
-#pragma pop
-
-/* 807615FC-80761600 000100 0004+00 0/2 0/0 0/0 .rodata @4965 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4965 = 40.0f;
-COMPILER_STRIP_GATE(0x807615FC, &lit_4965);
-#pragma pop
-
-/* 80761600-80761604 000104 0004+00 0/1 0/0 0/0 .rodata @4966 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4966 = -2790.0f;
-COMPILER_STRIP_GATE(0x80761600, &lit_4966);
-#pragma pop
-
-/* 80761604-80761608 000108 0004+00 0/1 0/0 0/0 .rodata @4967 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4967 = 185.0f;
-COMPILER_STRIP_GATE(0x80761604, &lit_4967);
-#pragma pop
-
-/* 80761608-8076160C 00010C 0004+00 0/1 0/0 0/0 .rodata @4968 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4968 = -3330.0f;
-COMPILER_STRIP_GATE(0x80761608, &lit_4968);
-#pragma pop
-
-/* 8076160C-80761610 000110 0004+00 0/1 0/0 0/0 .rodata @4969 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4969 = 310.0f;
-COMPILER_STRIP_GATE(0x8076160C, &lit_4969);
-#pragma pop
-
-/* 80761610-80761614 000114 0004+00 0/1 0/0 0/0 .rodata @4970 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4970 = 85.0f;
-COMPILER_STRIP_GATE(0x80761610, &lit_4970);
-#pragma pop
-
-/* 80761614-80761618 000118 0004+00 0/1 0/0 0/0 .rodata @4971 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4971 = -2745.0f;
-COMPILER_STRIP_GATE(0x80761614, &lit_4971);
-#pragma pop
-
-/* 80761618-8076161C 00011C 0004+00 0/1 0/0 0/0 .rodata @4972 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4972 = 110.0f;
-COMPILER_STRIP_GATE(0x80761618, &lit_4972);
-#pragma pop
-
-/* 8076161C-80761620 000120 0004+00 0/1 0/0 0/0 .rodata @4973 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4973 = 705.0f;
-COMPILER_STRIP_GATE(0x8076161C, &lit_4973);
-#pragma pop
-
-/* 80761620-80761624 000124 0004+00 0/1 0/0 0/0 .rodata @4974 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4974 = -3650.0f;
-COMPILER_STRIP_GATE(0x80761620, &lit_4974);
-#pragma pop
-
-/* 80761624-80761628 000128 0004+00 0/2 0/0 0/0 .rodata @4975 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4975 = 220.0f;
-COMPILER_STRIP_GATE(0x80761624, &lit_4975);
-#pragma pop
-
-/* 80761628-8076162C 00012C 0004+00 0/1 0/0 0/0 .rodata @4976 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4976 = -1930.0f;
-COMPILER_STRIP_GATE(0x80761628, &lit_4976);
-#pragma pop
-
-/* 8076162C-80761630 000130 0004+00 0/1 0/0 0/0 .rodata @4977 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4977 = -130.0f;
-COMPILER_STRIP_GATE(0x8076162C, &lit_4977);
-#pragma pop
-
-/* 80761630-80761634 000134 0004+00 0/2 0/0 0/0 .rodata @4978 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4978 = -600.0f;
-COMPILER_STRIP_GATE(0x80761630, &lit_4978);
-#pragma pop
-
-/* 80761634-80761638 000138 0004+00 0/1 0/0 0/0 .rodata @4979 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4979 = -85.0f;
-COMPILER_STRIP_GATE(0x80761634, &lit_4979);
-#pragma pop
-
-/* 80761638-8076163C 00013C 0004+00 0/1 0/0 0/0 .rodata @4980 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4980 = 320.0f;
-COMPILER_STRIP_GATE(0x80761638, &lit_4980);
-#pragma pop
-
-/* 8076163C-80761640 000140 0004+00 0/1 0/0 0/0 .rodata @4981 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4981 = 295.0f;
-COMPILER_STRIP_GATE(0x8076163C, &lit_4981);
-#pragma pop
-
-/* 80761640-80761644 000144 0004+00 0/1 0/0 0/0 .rodata @4982 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4982 = 210.0f;
-COMPILER_STRIP_GATE(0x80761640, &lit_4982);
-#pragma pop
-
-/* 80761644-80761648 000148 0004+00 0/1 0/0 0/0 .rodata @4983 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4983 = -2670.0f;
-COMPILER_STRIP_GATE(0x80761644, &lit_4983);
-#pragma pop
-
-/* 80761648-8076164C 00014C 0004+00 0/1 0/0 0/0 .rodata @4984 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4984 = -5.0f;
-COMPILER_STRIP_GATE(0x80761648, &lit_4984);
-#pragma pop
-
-/* 8076164C-80761650 000150 0004+00 0/1 0/0 0/0 .rodata @4985 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4985 = -2325.0f;
-COMPILER_STRIP_GATE(0x8076164C, &lit_4985);
-#pragma pop
-
-/* 80761650-80761654 000154 0004+00 0/1 0/0 0/0 .rodata @4986 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4986 = 145.0f;
-COMPILER_STRIP_GATE(0x80761650, &lit_4986);
-#pragma pop
-
-/* 80761654-80761658 000158 0004+00 0/1 0/0 0/0 .rodata @4987 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4987 = -2200.0f;
-COMPILER_STRIP_GATE(0x80761654, &lit_4987);
-#pragma pop
-
-/* 80761658-8076165C 00015C 0004+00 0/1 0/0 0/0 .rodata @4988 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4988 = 75.0f;
-COMPILER_STRIP_GATE(0x80761658, &lit_4988);
-#pragma pop
-
-/* 8076165C-80761660 000160 0004+00 0/1 0/0 0/0 .rodata @4989 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4989 = -3270.0f;
-COMPILER_STRIP_GATE(0x8076165C, &lit_4989);
-#pragma pop
-
-/* 80761660-80761664 000164 0004+00 0/1 0/0 0/0 .rodata @4990 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4990 = -205.0f;
-COMPILER_STRIP_GATE(0x80761660, &lit_4990);
-#pragma pop
-
-/* 80761664-80761668 000168 0004+00 0/1 0/0 0/0 .rodata @4991 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4991 = -3430.0f;
-COMPILER_STRIP_GATE(0x80761664, &lit_4991);
-#pragma pop
-
-/* 80761668-8076166C 00016C 0004+00 0/2 0/0 0/0 .rodata @4992 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4992 = 20.0f;
-COMPILER_STRIP_GATE(0x80761668, &lit_4992);
-#pragma pop
-
-/* 8076166C-80761670 000170 0004+00 0/1 0/0 0/0 .rodata @4993 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4993 = 130.0f;
-COMPILER_STRIP_GATE(0x8076166C, &lit_4993);
-#pragma pop
-
-/* 80761670-80761674 000174 0004+00 0/1 0/0 0/0 .rodata @4994 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4994 = -2630.0f;
-COMPILER_STRIP_GATE(0x80761670, &lit_4994);
-#pragma pop
-
-/* 80761674-80761678 000178 0004+00 0/1 0/0 0/0 .rodata @4995 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4995 = 15.0f;
-COMPILER_STRIP_GATE(0x80761674, &lit_4995);
-#pragma pop
-
-/* 80761678-8076167C 00017C 0004+00 0/1 0/0 0/0 .rodata @4996 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4996 = 285.0f;
-COMPILER_STRIP_GATE(0x80761678, &lit_4996);
-#pragma pop
-
-/* 8076167C-80761680 000180 0004+00 0/1 0/0 0/0 .rodata @4997 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4997 = -760.0f;
-COMPILER_STRIP_GATE(0x8076167C, &lit_4997);
-#pragma pop
-
-/* 80761680-80761684 000184 0004+00 0/3 0/0 0/0 .rodata @4998 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4998 = -1500.0f;
-COMPILER_STRIP_GATE(0x80761680, &lit_4998);
-#pragma pop
-
-/* 80761684-80761688 000188 0004+00 0/1 0/0 0/0 .rodata @4999 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4999 = -2800.0f;
-COMPILER_STRIP_GATE(0x80761684, &lit_4999);
-#pragma pop
-
-/* 80761688-8076168C 00018C 0004+00 0/1 0/0 0/0 .rodata @5000 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5000 = -2500.0f;
-COMPILER_STRIP_GATE(0x80761688, &lit_5000);
-#pragma pop
-
-/* 80761E2C-80761E3C 000074 000C+04 0/1 0/0 0/0 .bss @4339 */
-#pragma push
-#pragma force_active on
-static u8 lit_4339[12 + 4 /* padding */];
-#pragma pop
-
-/* 80761E3C-80761E48 000084 000C+00 0/1 0/0 0/0 .bss @4342 */
-#pragma push
-#pragma force_active on
-static u8 lit_4342[12];
-#pragma pop
-
-/* 80761E48-80761E54 000090 000C+00 0/1 0/0 0/0 .bss @4343 */
-#pragma push
-#pragma force_active on
-static u8 lit_4343[12];
-#pragma pop
-
-/* 80761E54-80761E60 00009C 000C+00 0/1 0/0 0/0 .bss @4344 */
-#pragma push
-#pragma force_active on
-static u8 lit_4344[12];
-#pragma pop
-
-/* 80761E60-80761E6C 0000A8 000C+00 0/1 0/0 0/0 .bss @4345 */
-#pragma push
-#pragma force_active on
-static u8 lit_4345[12];
-#pragma pop
-
-/* 80761E6C-80761E78 0000B4 000C+00 0/1 0/0 0/0 .bss @4346 */
-#pragma push
-#pragma force_active on
-static u8 lit_4346[12];
-#pragma pop
-
-/* 80761E78-80761E84 0000C0 000C+00 0/1 0/0 0/0 .bss @4347 */
-#pragma push
-#pragma force_active on
-static u8 lit_4347[12];
-#pragma pop
-
-/* 80761E84-80761E90 0000CC 000C+00 0/1 0/0 0/0 .bss @4348 */
-#pragma push
-#pragma force_active on
-static u8 lit_4348[12];
-#pragma pop
-
-/* 80761E90-80761E9C 0000D8 000C+00 0/1 0/0 0/0 .bss @4349 */
-#pragma push
-#pragma force_active on
-static u8 lit_4349[12];
-#pragma pop
-
-/* 80761E9C-80761EA8 0000E4 000C+00 0/1 0/0 0/0 .bss @4350 */
-#pragma push
-#pragma force_active on
-static u8 lit_4350[12];
-#pragma pop
-
-/* 80761EA8-80761EB4 0000F0 000C+00 0/1 0/0 0/0 .bss @4351 */
-#pragma push
-#pragma force_active on
-static u8 lit_4351[12];
-#pragma pop
-
-/* 80761EB4-80761EC0 0000FC 000C+00 0/1 0/0 0/0 .bss @4352 */
-#pragma push
-#pragma force_active on
-static u8 lit_4352[12];
-#pragma pop
-
-/* 80761EC0-80761ECC 000108 000C+00 0/1 0/0 0/0 .bss @4353 */
-#pragma push
-#pragma force_active on
-static u8 lit_4353[12];
-#pragma pop
-
-/* 80761ECC-80761ED8 000114 000C+00 0/1 0/0 0/0 .bss @4354 */
-#pragma push
-#pragma force_active on
-static u8 lit_4354[12];
-#pragma pop
-
-/* 80761ED8-80761EE4 000120 000C+00 0/1 0/0 0/0 .bss @4355 */
-#pragma push
-#pragma force_active on
-static u8 lit_4355[12];
-#pragma pop
-
-/* 80761EE4-80761EF0 00012C 000C+00 0/1 0/0 0/0 .bss @4356 */
-#pragma push
-#pragma force_active on
-static u8 lit_4356[12];
-#pragma pop
-
-/* 80761EF0-80761EFC 000138 000C+00 0/1 0/0 0/0 .bss @4357 */
-#pragma push
-#pragma force_active on
-static u8 lit_4357[12];
-#pragma pop
-
-/* 80761EFC-80761F08 000144 000C+00 0/1 0/0 0/0 .bss @4358 */
-#pragma push
-#pragma force_active on
-static u8 lit_4358[12];
-#pragma pop
-
-/* 80761F08-80761FE0 000150 00D8+00 0/1 0/0 0/0 .bss mPzCenterInit_dt$4338 */
-#pragma push
-#pragma force_active on
-static u8 mPzCenterInit_dt[216];
-#pragma pop
-
-/* 80761FE0-80761FF0 000228 000C+04 0/1 0/0 0/0 .bss @4360 */
-#pragma push
-#pragma force_active on
-static u8 lit_4360[12 + 4 /* padding */];
-#pragma pop
-
-/* 80761FF0-80761FFC 000238 000C+00 0/1 0/0 0/0 .bss @4363 */
-#pragma push
-#pragma force_active on
-static u8 lit_4363[12];
-#pragma pop
-
-/* 80761FFC-80762008 000244 000C+00 0/1 0/0 0/0 .bss @4364 */
-#pragma push
-#pragma force_active on
-static u8 lit_4364[12];
-#pragma pop
-
-/* 80762008-80762014 000250 000C+00 0/1 0/0 0/0 .bss @4365 */
-#pragma push
-#pragma force_active on
-static u8 lit_4365[12];
-#pragma pop
-
-/* 80762014-80762020 00025C 000C+00 0/1 0/0 0/0 .bss @4366 */
-#pragma push
-#pragma force_active on
-static u8 lit_4366[12];
-#pragma pop
-
-/* 80762020-8076202C 000268 000C+00 0/1 0/0 0/0 .bss @4367 */
-#pragma push
-#pragma force_active on
-static u8 lit_4367[12];
-#pragma pop
-
-/* 8076202C-80762038 000274 000C+00 0/1 0/0 0/0 .bss @4368 */
-#pragma push
-#pragma force_active on
-static u8 lit_4368[12];
-#pragma pop
-
-/* 80762038-80762044 000280 000C+00 0/1 0/0 0/0 .bss @4369 */
-#pragma push
-#pragma force_active on
-static u8 lit_4369[12];
-#pragma pop
-
-/* 80762044-80762050 00028C 000C+00 0/1 0/0 0/0 .bss @4370 */
-#pragma push
-#pragma force_active on
-static u8 lit_4370[12];
-#pragma pop
-
-/* 80762050-8076205C 000298 000C+00 0/1 0/0 0/0 .bss @4371 */
-#pragma push
-#pragma force_active on
-static u8 lit_4371[12];
-#pragma pop
-
-/* 8076205C-80762068 0002A4 000C+00 0/1 0/0 0/0 .bss @4372 */
-#pragma push
-#pragma force_active on
-static u8 lit_4372[12];
-#pragma pop
-
-/* 80762068-80762074 0002B0 000C+00 0/1 0/0 0/0 .bss @4373 */
-#pragma push
-#pragma force_active on
-static u8 lit_4373[12];
-#pragma pop
-
-/* 80762074-80762080 0002BC 000C+00 0/1 0/0 0/0 .bss @4374 */
-#pragma push
-#pragma force_active on
-static u8 lit_4374[12];
-#pragma pop
-
-/* 80762080-8076208C 0002C8 000C+00 0/1 0/0 0/0 .bss @4375 */
-#pragma push
-#pragma force_active on
-static u8 lit_4375[12];
-#pragma pop
-
-/* 8076208C-80762098 0002D4 000C+00 0/1 0/0 0/0 .bss @4376 */
-#pragma push
-#pragma force_active on
-static u8 lit_4376[12];
-#pragma pop
-
-/* 80762098-807620A4 0002E0 000C+00 0/1 0/0 0/0 .bss @4377 */
-#pragma push
-#pragma force_active on
-static u8 lit_4377[12];
-#pragma pop
-
-/* 807620A4-807620B0 0002EC 000C+00 0/1 0/0 0/0 .bss @4378 */
-#pragma push
-#pragma force_active on
-static u8 lit_4378[12];
-#pragma pop
-
-/* 807620B0-807620BC 0002F8 000C+00 0/1 0/0 0/0 .bss @4379 */
-#pragma push
-#pragma force_active on
-static u8 lit_4379[12];
-#pragma pop
-
-/* 807620BC-80762194 000304 00D8+00 0/1 0/0 0/0 .bss mPzEyeInit_dt$4359 */
-#pragma push
-#pragma force_active on
-static u8 mPzEyeInit_dt[216];
-#pragma pop
+ mCurrentPoint = cM_rndF(mPointNum);
+ if (mCurrentPoint >= mPointNum) {
+ mCurrentPoint = mPointNum - 1;
+ } else if (mCurrentPoint == 0) {
+ mCurrentPoint = 1;
+ }
-/* 807593CC-8075B7CC 000F4C 2400+00 2/1 0/0 0/0 .text executeOpeningDemo__8daE_PZ_cFv */
-void daE_PZ_c::executeOpeningDemo() {
- // NONMATCHING
+ setActionMode(ACTION_WAIT_e, 0);
+ }
}
-/* 8075B7CC-8075B7E0 00334C 0014+00 1/1 0/0 0/0 .text checkSkipEdge__14dEvt_control_cFv
- */
-// void dEvt_control_c::checkSkipEdge() {
-extern "C" void checkSkipEdge__14dEvt_control_cFv() {
- // NONMATCHING
+/* 807593CC-8075B7CC 000F4C 2400+00 2/1 0/0 0/0 .text executeOpeningDemo__8daE_PZ_cFv */
+// NONMATCHING - fopAcM_GetID not getting inlined, equivalent
+void daE_PZ_c::executeOpeningDemo() {
+ static cXyz mPzCenterInit_dt[] = {
+ cXyz(-50.0f, 10.0f, -3150.0f),
+ cXyz(-50.0f, 100.0f, -3140.0f),
+ cXyz(105.0f, 70.0f, -2950.0f),
+ cXyz(-65.0f, 270.0f, -3200.0f),
+ cXyz(-95.0f, 180.0f, -3100.0f),
+ cXyz(-20.0f, 30.0f, -1590.0f),
+ cXyz(-110.0f, 170.0f, -940.0f),
+ cXyz(-60.0f, 560.0f, -1420.0f),
+ cXyz(-157.0f, 128.0f, -3260.0f),
+ cXyz(0.0f, 0.0f, 0.0f),
+ cXyz(0.0f, 150.0f, -3050.0f),
+ cXyz(105.0f, 70.0f, -2950.0f),
+ cXyz(0.0f, 125.0f, -2710.0f),
+ cXyz(0.0f, 380.0f, -2515.0f),
+ cXyz(0.0f, 300.0f, -2960.0f),
+ cXyz(-15.0f, 200.0f, -3160.0f),
+ cXyz(-10.0f, 120.0f, -3010.0f),
+ cXyz(0.0f, 150.0f, -1120.0f),
+ };
+
+ static cXyz mPzEyeInit_dt[] = {
+ cXyz(-210.0f, 40.0f, -2790.0f),
+ cXyz(-210.0f, 40.0f, -2790.0f),
+ cXyz(185.0f, 100.0f, -3330.0f),
+ cXyz(310.0f, 85.0f, -2745.0f),
+ cXyz(110.0f, 705.0f, -3650.0f),
+ cXyz(0.0f, 220.0f, -1930.0f),
+ cXyz(-130.0f, -10.0f, -600.0f),
+ cXyz(-85.0f, 320.0f, -1120.0f),
+ cXyz(295.0f, 85.0f, -2790.0f),
+ cXyz(0.0f, 0.0f, 0.0f),
+ cXyz(0.0f, 210.0f, -2670.0f),
+ cXyz(185.0f, 100.0f, -3330.0f),
+ cXyz(-5.0f, 170.0f, -2325.0f),
+ cXyz(0.0f, 145.0f, -2200.0f),
+ cXyz(75.0f, 85.0f, -3270.0f),
+ cXyz(-205.0f, 5.0f, -3430.0f),
+ cXyz(20.0f, 130.0f, -2630.0f),
+ cXyz(15.0f, 285.0f, -760.0f),
+ };
+
+ camera_class* camera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0));
+ camera_class* camera0 = dComIfGp_getCamera(0);
+ daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0);
+
+ cXyz sp120;
+ cXyz sp114;
+ cXyz sp108;
+ cXyz spFC;
+
+ fopAc_ac_c* parent;
+ int sp28 = 22;
+
+ switch (mMoveMode) {
+ case 0:
+ case 100:
+ if (player->current.pos.z > -1500.0f) {
+ break;
+ }
+ mMoveMode++;
+ case 1:
+ case 101:
+ if (!eventInfo.checkCommandDemoAccrpt()) {
+ fopAcM_orderPotentialEvent(this, 2, 0xFFFF, 0);
+ eventInfo.i_onCondition(2);
+ mDemoCameraEye = camera0->lookat.eye;
+ mDemoCameraCenter = camera0->lookat.center;
+ break;
+ }
+
+ camera->mCamera.Stop();
+ camera->mCamera.SetTrimSize(3);
+ daPy_getPlayerActorClass()->changeOriginalDemo();
+ daPy_getPlayerActorClass()->changeDemoMode(4, 2, 0, 0);
+
+ if (mMoveMode == 1) {
+ sp120.set(0.0f, player->current.pos.y, -2800.0f);
+ daPy_getPlayerActorClass()->setPlayerPosAndAngle(&sp120, -0x8000, 0);
+ Z2GetAudioMgr()->bgmStreamPrepare(0x2000041);
+ mDemoCameraCenter.set(mPzCenterInit_dt[0]);
+ mDemoCameraEye.set(mPzEyeInit_dt[0]);
+ } else {
+ sp120.set(0.0f, player->current.pos.y, -2500.0f);
+ daPy_getPlayerActorClass()->setPlayerPosAndAngle(&sp120, -0x8000, 0);
+ Z2GetAudioMgr()->bgmStreamPrepare(0x2000042);
+ mDemoCameraCenter.set(mPzCenterInit_dt[10]);
+ mDemoCameraEye.set(mPzEyeInit_dt[10]);
+ }
+
+ Z2GetAudioMgr()->bgmStreamPlay();
+ field_0x7d0 = 2;
+ setBck(8, 0, 3.0f, -1.0f);
+ mpModelMorf->setFrame(0.0f);
+ dComIfGp_getEvent().startCheckSkipEdge(this);
+ dComIfGs_onSaveDunSwitch(41);
+ mMoveMode++;
+ break;
+ case 2:
+ if (field_0x7d0 != 0) {
+ sp120.set(0.0f, player->current.pos.y, -2500.0f);
+ daPy_getPlayerActorClass()->setPlayerPosAndAngle(&sp120, -0x8000, 0);
+ daPy_getPlayerActorClass()->changeDemoMode(2, 0, 0, 0);
+ break;
+ }
+
+ current.pos.set(-100.0f, 0.0f, -3300.0f);
+ current.angle.y = fopAcM_searchPlayerAngleY(this);
+ field_0x7d0 = 150;
+ mMoveMode++;
+ case 3:
+ sp120.set(0.0f, player->current.pos.y, -3000.0f);
+ player->changeDemoPos0(&sp120);
+
+ sp120.set(mPzCenterInit_dt[1]);
+ cLib_addCalcPos(&mDemoCameraCenter, sp120, 0.7f, 2.0f, 0.5f);
+ sp114.set(mPzEyeInit_dt[1]);
+ cLib_addCalcPos(&mDemoCameraEye, sp114, 0.7f, 2.0f, 0.5f);
+
+ sp108 = mDemoCameraCenter - sp120;
+ spFC = mDemoCameraEye - sp114;
+ if (field_0x7d0 != 0 || sp108.abs() > 2.0f || spFC.abs() > 2.0f) {
+ break;
+ }
+
+ field_0x7d0 = 100;
+ mMoveMode++;
+ case 4:
+ fopAcM_onSwitch(this, 25);
+ field_0x7d0 = 80;
+ mMoveMode++;
+ break;
+ case 5:
+ if (field_0x7d0 != 0) {
+ if (field_0x7d0 == 60) {
+ daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 0, 0);
+ }
+ break;
+ }
+
+ field_0x7d0 = 60;
+ mMoveMode++;
+ break;
+ case 6:
+ fopAcM_onSwitch(this, 26);
+ if (field_0x7d0 != 0) {
+ mDemoCameraCenter.set(mPzCenterInit_dt[2]);
+ mDemoCameraEye.set(mPzEyeInit_dt[2]);
+
+ if (field_0x7d0 == 30) {
+ daPy_getPlayerActorClass()->changeDemoMode(0x19, 0, 0, 0);
+ }
+ break;
+ }
+
+ mDemoCameraCenter.set(mPzCenterInit_dt[8]);
+ mDemoCameraEye.set(mPzEyeInit_dt[8]);
+ field_0x7d0 = 10;
+ mMoveMode = 10;
+ break;
+ case 10:
+ if (field_0x7d0 != 0) {
+ fopAcM_OffStatus(this, 0);
+ break;
+ }
+
+ field_0x844 = 1;
+ mEntrySUB(true);
+ setBck(8, 0, 0.0f, 1.0f);
+ mPzScale.set(0.0f, field_0x7cc, 0.0f);
+ field_0x7d0 = 8;
+ mMoveMode++;
+ break;
+ case 11:
+ mPzScaleSet(0);
+ current.angle.y = fopAcM_searchPlayerAngleY(this);
+
+ if (field_0x7d0 == 1) {
+ if (!daPy_py_c::i_checkNowWolf()) {
+ daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 2, 0);
+ } else {
+ daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 0, 0);
+ }
+ }
+
+ if (mpModelMorf->isStop() && mAnm != 0x15) {
+ setBck(0x15, 2, 3.0f, 1.0f);
+ field_0x7d0 = 40;
+ mMoveMode++;
+ }
+ break;
+ case 12:
+ case 120:
+ if (field_0x7d0 == 0) {
+ setBck(0xB, 0, 3.0f, 1.0f);
+ field_0x5dc.startCreatureVoice(Z2SE_EN_PZ_V_ATK_RDY, -1);
+ mMoveMode++;
+ }
+ break;
+ case 13:
+ if ((int)mpModelMorf->getFrame() > 27) {
+ cLib_addCalcPos(&mDemoCameraCenter, mPzCenterInit_dt[3], 0.5f, 5.0f, 0.5f);
+ cLib_addCalcPos(&mDemoCameraEye, mPzEyeInit_dt[3], 0.5f, 5.0f, 0.5f);
+ }
+
+ if (mAnm == 0xB && !mpModelMorf->isStop()) {
+ field_0x7d0 = 30;
+ break;
+ }
+ case 121:
+ cLib_addCalcPos(&mDemoCameraCenter, mPzCenterInit_dt[3], 0.5f, 10.0f, 0.5f);
+ mSetFirePos();
+
+ if (mAnm != 0xD) {
+ setBck(0xD, 2, 3.0f, 1.0f);
+ parentActorID = fopAcM_createChild(PROC_E_PZ, fopAcM_GetID(this), sp28 + arg0, &field_0x7a8, fopAcM_GetRoomNo(this), &shape_angle, NULL, -1, NULL);
+ }
+
+ field_0x7d8 = 0;
+ data_80761E29 = 0;
+
+ if (field_0x7d0 == 0) {
+ field_0x7d0 = 120;
+ if (mMoveMode == 13) {
+ mMoveMode++;
+ } else {
+ setBck(0xC, 0, 10.0f, 1.0f);
+ mMoveMode = 123;
+ }
+ }
+ break;
+ case 14:
+ case 122:
+ cLib_addCalcPos(&mDemoCameraCenter, mPzCenterInit_dt[3], 0.5f, 10.0f, 0.5f);
+ mSetFirePos();
+ cLib_addCalcPos(&mDemoCameraEye, mPzEyeInit_dt[4], 0.1f + NREG_F(0), 10.0f + NREG_F(1), 1.0f + NREG_F(2));
+
+ if (field_0x7d0 == 0) {
+ daPy_getPlayerActorClass()->changeDemoMode(0x10, 0, 0, 0);
+ setBck(0xC, 0, 10.0f, 1.0f);
+ mMoveMode++;
+ }
+ break;
+ case 15:
+ case 123:
+ if ((mAnm == 0xC && (int)mpModelMorf->getFrame() == 34) || (mAnm == 9 && (int)mpModelMorf->getFrame() == 20)) {
+ field_0x5dc.startCreatureVoice(Z2SE_EN_PZ_V_ATK_TRW_1ST, -1);
+ }
+
+ if (fopAcM_SearchByID(parentActorID, &parent) && parent != NULL) {
+ if ((int)mpModelMorf->getFrame() < 36) {
+ parent->current.pos.set(field_0x7a8);
+ break;
+ }
+
+ if ((int)mpModelMorf->getFrame() == 36) {
+ ((daE_PZ_c*)parent)->mMoveMode = 20;
+ dComIfGp_particle_set(0x889D, &parent->current.pos, &shape_angle, NULL);
+
+ if (!daPy_py_c::i_checkNowWolf()) {
+ daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 2, 0);
+ } else {
+ daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 0, 0);
+ }
+ mMoveMode++;
+ }
+ break;
+ }
+
+ mMoveMode++;
+ break;
+ case 16:
+ case 124:
+ if (mpModelMorf->isStop()) {
+ break;
+ }
+
+ setBck(0x15, 2, 3.0f, 1.0f);
+ daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 0, 0);
+
+ if (fopAcM_SearchByID(parentActorID, &parent) && parent != NULL) {
+ ((daE_PZ_c*)parent)->mMoveMode = 21;
+ }
+
+ field_0x7d0 = XREG_S(0) + 120;
+ mMoveMode++;
+ case 17:
+ case 125:
+ field_0x841 = 1;
+
+ eyePos.y += 1000.0f;
+ attention_info.position = eyePos;
+ attention_info.position.y += 140.0f;
+
+ sp120.set(0.0f, player->current.pos.y, -1300.0f);
+ daPy_getPlayerActorClass()->setPlayerPosAndAngle(&sp120, -0x8000, 0);
+
+ mDemoCameraCenter.set(mPzCenterInit_dt[6]);
+ mDemoCameraEye.set(mPzEyeInit_dt[6]);
+
+ if (field_0x7d0 == 0) {
+ field_0x7d0 = 40;
+ if (mMoveMode == 17) {
+ mMoveMode = 30;
+ } else {
+ mMoveMode = 130;
+ }
+
+ dComIfGp_getEvent().reset(this);
+ fopAcM_orderPotentialEvent(this, 2, 0xFFFF, 3);
+ }
+ break;
+ case 130:
+ field_0x7d8 = 2;
+ data_80761E29 = 2;
+ data_80761E28 = 0;
+ case 30:
+ if (!eventInfo.i_checkCommandDemoAccrpt()) {
+ fopAcM_orderPotentialEvent(this, 2, 0xFFFF, 3);
+ break;
+ }
+
+ daPy_getPlayerActorClass()->changeOriginalDemo();
+ sp120.set(0.0f, player->current.pos.y, -1300.0f);
+ daPy_getPlayerActorClass()->setPlayerPosAndAngle(&sp120, -0x8000, 0);
+
+ if (!daPy_py_c::i_checkNowWolf()) {
+ daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 2, 0);
+ } else {
+ daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 0, 0);
+ }
+
+ sp120.set(mPzCenterInit_dt[7]);
+ sp108 = mDemoCameraCenter - sp120;
+ cLib_addCalcPos(&mDemoCameraCenter, sp120, 0.7f, sp108.abs() / 20.0f, 1.0f);
+
+ sp114.set(mPzEyeInit_dt[7]);
+ spFC = mDemoCameraEye - sp114;
+ cLib_addCalcPos(&mDemoCameraEye, sp114, 0.7f, spFC.abs() / 20.0f, 1.0f);
+
+ if (field_0x7d0 == 0) {
+ if (fopAcM_SearchByID(parentActorID, &parent) && parent != NULL) {
+ ((daE_PZ_c*)parent)->mMoveMode = 30;
+ }
+
+ field_0x7d7 = 0;
+ if (mMoveMode == 30) {
+ field_0x7d0 = 80;
+ } else {
+ field_0x7d0 = 60;
+ }
+ mMoveMode++;
+ }
+ break;
+ case 31:
+ case 131:
+ if (mMoveMode == 31) {
+ if (!daPy_py_c::i_checkNowWolf()) {
+ sp120.set(-70.0f, 250.0f + XREG_F(1), -950.0f + XREG_F(2));
+ } else {
+ sp120.set(-70.0f, 200.0f + XREG_F(3), -700.0f + XREG_F(4));
+ }
+ } else {
+ sp120.set(0.0f, 0.0f, -1500.0f);
+ }
+ daPy_getPlayerActorClass()->setPlayerPosAndAngle(&sp120, -0x8000, 0);
+
+ for (int i = 0; i < 25; i++) {
+ if (field_0x7dc[i] != 0 && fopAcM_SearchByID(field_0x7dc[i], &parent) && parent != NULL) {
+ fopAcM_OnStatus(parent, 0x4000);
+ }
+ }
+
+ if (field_0x7d0 == 0) {
+ field_0x7d7 = 0;
+ field_0x7d0 = 30;
+ if (mMoveMode == 31) {
+ field_0x7d0 = 50;
+ }
+ mMoveMode++;
+ }
+ break;
+ case 132:
+ field_0x844 = 0;
+ mEntrySUB(false);
+ mPzScale.zero();
+ field_0x7d7 = 1;
+ mMoveMode = 32;
+ break;
+ case 32:
+ if (field_0x7d0 != 0) {
+ if (field_0x7d7 == 0) {
+ if (field_0x7d0 >= 30) {
+ if (arg0 == 0) {
+ if (!daPy_py_c::i_checkNowWolf()) {
+ sp120.set(0.0f, 0.0f, -800.0f);
+ } else {
+ sp120.set(0.0f, 0.0f, -700.0f);
+ }
+ } else {
+ sp120.set(0.0f, 0.0f, -1500.0f);
+ }
+
+ daPy_getPlayerActorClass()->setPlayerPosAndAngle(&sp120, -0x8000, 0);
+ } else {
+ mDemoCameraCenter.set(mPzCenterInit_dt[6]);
+ mDemoCameraEye.set(mPzEyeInit_dt[6]);
+ camera->mCamera.Set(mDemoCameraCenter, mDemoCameraEye);
+ }
+ }
+ break;
+ }
+
+ for (int i = 0; i < 25; i++) {
+ if (field_0x7dc[i] != 0 && fopAcM_SearchByID(field_0x7dc[i], &parent) && parent != NULL) {
+ fopAcM_OnStatus(parent, 0x4000);
+ }
+ }
+
+ if (field_0x7d7 != 0) {
+ if (field_0x7d7 == 1) {
+ data_80761E28 = 1;
+
+ mDemoCameraCenter.set(mPzCenterInit_dt[17]);
+ mDemoCameraEye.set(mPzEyeInit_dt[17]);
+ camera->mCamera.Set(mDemoCameraCenter, mDemoCameraEye);
+ field_0x7d7++;
+ break;
+ }
+
+ field_0x7d7++;
+ if (field_0x7d7 == 80) {
+ field_0x7d7 = 0;
+ }
+
+ break;
+ }
+
+ for (int i = 0; i < 25; i++) {
+ if (field_0x7dc[i] != 0 && fopAcM_SearchByID(field_0x7dc[i], &parent) && parent != NULL) {
+ fopAcM_OffStatus(parent, 0x4000);
+ }
+ }
+
+ if (mMoveMode == 32 && arg0 == 0) {
+ sp120.set(0.0f, 0.0f, -300.0f);
+ } else {
+ sp120.set(0.0f, 0.0f, -1500.0f);
+ }
+ daPy_getPlayerActorClass()->setPlayerPosAndAngle(&sp120, -0x8000, 0);
+
+ if (mMoveMode == 32 && arg0 == 0) {
+ sp120.set(0.0f, 0.0f, -100.0f);
+ } else {
+ sp120.set(0.0f, 0.0f, -1200.0f);
+ }
+
+ camera->mCamera.Reset(sp120, sp120);
+ camera->mCamera.Start();
+ camera->mCamera.SetTrimSize(0);
+ dComIfGp_event_reset();
+
+ if (fopAcM_SearchByID(parentActorID, &parent) && parent != NULL) {
+ ((daE_PZ_c*)parent)->mMoveMode = 32;
+ }
+
+ field_0x7d7 = 0;
+ field_0x7bc = 40.0f;
+
+ if (arg0 == 0) {
+ field_0x844 = 0;
+ mEntrySUB(false);
+ }
+
+ field_0x841 = 0;
+ setActionMode(ACTION_SEARCH_POINT_e, 0);
+ return;
+ case 102:
+ if (field_0x7d0 != 0) {
+ sp120.set(0.0f, player->current.pos.y, -2600.0f);
+ daPy_getPlayerActorClass()->setPlayerPosAndAngle(&sp120, -0x8000, 0);
+ daPy_getPlayerActorClass()->changeDemoMode(1, 1, 0, 0);
+ break;
+ }
+ field_0x7d0 = 60;
+ mMoveMode++;
+ case 103:
+ daPy_getPlayerActorClass()->changeDemoMode(2, 0, 0, 0);
+ sp120.set(0.0f, player->current.pos.y, -3000.0f);
+ player->changeDemoPos0(&sp120);
+
+ if (field_0x7d0 != 0) {
+ break;
+ }
+
+ field_0x7d0 = 60;
+ mMoveMode++;
+ case 104:
+ fopAcM_onSwitch(this, 28);
+
+ mDemoCameraCenter.set(mPzCenterInit_dt[11]);
+ mDemoCameraEye.set(mPzEyeInit_dt[11]);
+
+ if (field_0x7d0 != 0) {
+ if (field_0x7d0 != 40) {
+ break;
+ }
+ daPy_getPlayerActorClass()->changeDemoMode(0x19, 0, 0, 0);
+ break;
+ }
+
+ mDemoCameraCenter.set(mPzCenterInit_dt[10]);
+ mDemoCameraEye.set(mPzEyeInit_dt[10]);
+ daPy_getPlayerActorClass()->changeDemoMode(0x14, 0, 0, 0);
+
+ field_0x7d0 = 40;
+ mMoveMode++;
+ case 105:
+ if (field_0x7d0 != 0) {
+ break;
+ }
+ field_0x7d0 = 20;
+ mMoveMode++;
+ case 106:
+ sp120.set(mPzCenterInit_dt[12]);
+ sp108 = mDemoCameraCenter - sp120;
+ cLib_addCalcPos(&mDemoCameraCenter, sp120, 0.7f, sp108.abs() / 10.0f, 1.0f);
+
+ sp114.set(mPzEyeInit_dt[12]);
+ spFC = mDemoCameraEye - sp114;
+ cLib_addCalcPos(&mDemoCameraEye, sp114, 0.7f, spFC.abs() / 10.0f, 1.0f);
+
+ if (field_0x7d0 != 0 || sp108.abs() > 2.0f || spFC.abs() > 2.0f) {
+ break;
+ }
+
+ current.pos.set(0.0f, -60.0f, -2600.0f);
+ current.angle.y = fopAcM_searchPlayerAngleY(this);
+ mPzScale.set(l_HIO.body_model_size, l_HIO.body_model_size, l_HIO.body_model_size);
+
+ field_0x844 = 1;
+ mEntrySUB(true);
+ setBck(0x15, 2, 3.0f, 1.0f);
+ mpModelMorf->setFrame(0.0f);
+ mPzScale.set(0.0f, field_0x7cc, 0.0f);
+
+ sp108.set(current.pos);
+ sp108.y += field_0x7c0;
+ dComIfGp_particle_set(0x8897, &sp108, &shape_angle, NULL);
+
+ field_0x7d0 = 10;
+ mMoveMode++;
+ case 107:
+ mPzScaleSet(0);
+ if (field_0x7d0 != 0) {
+ break;
+ }
+ field_0x7d0 = 10;
+ mMoveMode++;
+ case 108:
+ if (field_0x7d0 != 0) {
+ break;
+ }
+ field_0x7d0 = 120;
+ mMoveMode++;
+ case 109:
+ if (mAnm == 0xB && mpModelMorf->isStop()) {
+ setBck(0xD, 2, 3.0f, 1.0f);
+ parentActorID = fopAcM_createChild(PROC_E_PZ, fopAcM_GetID(this), sp28 + arg0, &field_0x7a8, fopAcM_GetRoomNo(this), &shape_angle, NULL, -1, NULL);
+
+ field_0x7d8 = 2;
+ data_80761E29 = 2;
+ }
+
+ if (mAnm != 0xB && mAnm != 0xD) {
+ setBck(0xB, 0, 3.0f, 1.0f);
+ field_0x5dc.startCreatureVoice(Z2SE_EN_PZ_V_ATK_RDY, -1);
+ }
+
+ sp120.set(0.0f, 0.0f, -2600.0f);
+ cLib_addCalcPos(&current.pos, sp120, 0.7f, 3.0f, 1.0f);
+
+ sp120.set(mPzCenterInit_dt[13]);
+ cLib_addCalcPos(&mDemoCameraCenter, sp120, 0.7f, 6.0f, 2.0f);
+
+ sp114.set(mPzEyeInit_dt[13]);
+ cLib_addCalcPos(&mDemoCameraEye, sp114, 0.7f, 6.0f, 2.0f);
+
+ sp108 = mDemoCameraCenter - sp120;
+ spFC = mDemoCameraEye - sp114;
+ mSetFirePos();
+
+ if (field_0x7d0 != 0 || sp108.abs() > 2.0f) {
+ break;
+ }
+
+ if (spFC.abs() > 2.0f || field_0x7d8 != 2) {
+ break;
+ }
+
+ if (!daPy_py_c::i_checkNowWolf()) {
+ current.pos.set(0.0f, 0.0f, -2850.0f);
+ } else {
+ current.pos.set(0.0f, 0.0f, -3000.0f);
+ }
+
+ mSetFirePos();
+ daPy_getPlayerActorClass()->changeDemoMode(1, 1, 0, 0);
+
+ field_0x7d0 = 40;
+ mMoveMode++;
+ break;
+ case 110:
+ mSetFirePos();
+
+ if (!daPy_py_c::i_checkNowWolf()) {
+ mDemoCameraCenter.set(mPzCenterInit_dt[14]);
+ mDemoCameraEye.set(mPzEyeInit_dt[14]);
+ } else {
+ mDemoCameraCenter.set(mPzCenterInit_dt[15]);
+ mDemoCameraEye.set(mPzEyeInit_dt[15]);
+ }
+
+ if (field_0x7d0 == 0) {
+ daPy_getPlayerActorClass()->changeDemoMode(5, 0, 0, 0);
+ daPy_getPlayerActorClass()->changeDemoMoveAngle(0);
+
+ field_0x7d7 = 0;
+ field_0x7d0 = 7;
+ mMoveMode++;
+ }
+ break;
+ case 111:
+ if (field_0x7d0 != 0) {
+ if (field_0x7d0 == 1) {
+ if (!daPy_py_c::i_checkNowWolf()) {
+ daPy_getPlayerActorClass()->changeDemoMode(0xC, 1, 1, 0);
+ } else {
+ daPy_getPlayerActorClass()->changeDemoMode(0x2B, 0, 0, 0);
+ field_0x7d7 = 10;
+ }
+ }
+
+ mSetFirePos();
+ break;
+ }
+
+ if (field_0x7d7 < 10 && !daPy_py_c::i_checkNowWolf()) {
+ field_0x7d7++;
+ if (field_0x7d7 == 10) {
+ daPy_getPlayerActorClass()->changeDemoMode(0x24, 0x16, 0, 0);
+ }
+
+ mSetFirePos();
+ break;
+ }
+
+ field_0x7d7++;
+ if (field_0x7d7 < 20) {
+ mSetFirePos();
+ break;
+ }
+
+ mDemoCameraCenter.set(mPzCenterInit_dt[16]);
+ mDemoCameraEye.set(mPzEyeInit_dt[16]);
+
+ if (mPzScaleSet(1)) {
+ current.pos.set(-100.0f, 0.0f, -3300.0f);
+ current.angle.y = fopAcM_searchPlayerAngleY(this);
+ sp120.set(0.0f, player->current.pos.y, -3000.0f);
+ daPy_getPlayerActorClass()->setPlayerPosAndAngle(&sp120, 0, 0);
+ field_0x844 = 0;
+ mEntrySUB(false);
+ current.angle.y = fopAcM_searchPlayerAngleY(this);
+
+ field_0x7d0 = 10;
+ mMoveMode++;
+ }
+ break;
+ case 112:
+ if (field_0x7d0 != 0) {
+ break;
+ }
+
+ field_0x844 = 1;
+ mEntrySUB(true);
+ setBck(8, 0, 0.0f, 1.0f);
+ mPzScale.set(0.0f, field_0x7cc, 0.0f);
+ field_0x7d0 = 40;
+ mMoveMode++;
+ case 113:
+ if (mpModelMorf->isStop() && mAnm != 0x15) {
+ setBck(0x15, 2, 3.0f, 1.0f);
+ }
+
+ mPzScaleSet(0);
+
+ if (field_0x7d0 != 0) {
+ if (field_0x7d0 == 20) {
+ daPy_getPlayerActorClass()->changeDemoMode(0x19, 0, 0, 0);
+ }
+ break;
+ }
+
+ daPy_getPlayerActorClass()->changeDemoMode(5, 0, 0, 0);
+ daPy_getPlayerActorClass()->changeDemoMoveAngle(-0x8000);
+
+ field_0x7d0 = 10;
+ mMoveMode++;
+ break;
+ case 114:
+ if (field_0x7d0 == 0) {
+ if (!daPy_py_c::i_checkNowWolf()) {
+ daPy_getPlayerActorClass()->changeDemoMode(0x22, 1, 0, 0);
+ } else {
+ daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 0, 0);
+ }
+
+ mDemoCameraCenter.set(mPzCenterInit_dt[3]);
+ mDemoCameraEye.set(mPzEyeInit_dt[4]);
+
+ parentActorID = fopAcM_createChild(PROC_E_PZ, fopAcM_GetID(this), sp28 + arg0, &field_0x7a8, fopAcM_GetRoomNo(this), &shape_angle, NULL, -1, NULL);
+
+ setBck(0xC, 0, 10.0f, 1.0f);
+ daPy_getPlayerActorClass()->changeDemoMode(0x10, 0, 0, 0);
+ mMoveMode = 123;
+ }
+ }
+
+ if (mMoveMode >= 2 && mMoveMode != 100 && mMoveMode != 101 && mMoveMode != 32) {
+ camera->mCamera.Set(mDemoCameraCenter, mDemoCameraEye);
+ }
+
+ if (((mMoveMode >= 2 && mMoveMode <= 17) || (mMoveMode >= 102 && mMoveMode <= 125)) && dComIfGp_getEvent().checkSkipEdge()) {
+ cDmr_SkipInfo = 1;
+ dStage_changeScene(1, 0.0f, 0, fopAcM_GetRoomNo(this), 0, -1);
+ Z2GetAudioMgr()->bgmStreamStop(0x1E);
+ }
}
/* 8075B7E0-8075B970 003360 0190+00 1/1 0/0 0/0 .text mPointerSet__8daE_PZ_cFv */
void daE_PZ_c::mPointerSet() {
- // NONMATCHING
+ u8 var_r30 = cM_rndF(mPointNum);
+
+ for (int i = 0; mCurrentPoint == var_r30 && i < 100; i++) {
+ var_r30 = cM_rndF(mPointNum);
+ }
+
+ if (mCurrentPoint == var_r30) {
+ var_r30 = 0;
+ }
+
+ mCurrentPoint = var_r30;
+
+ if (field_0x846 == 0) {
+ if ((arg0 == 0 && field_0x780[mCurrentPoint] == 0) || (arg0 != 0 && field_0x780[mCurrentPoint] == 9)) {
+ var_r30 = cM_rndF(mPointNum);
+ if (mCurrentPoint != var_r30) {
+ mCurrentPoint = var_r30;
+ } else {
+ mCurrentPoint++;
+ }
+ }
+ field_0x846 = 1;
+ }
+
+ if (mCurrentPoint >= mPointNum) {
+ mCurrentPoint = mPointNum - 1;
+ }
}
/* 8075B970-8075C6AC 0034F0 0D3C+00 2/1 0/0 0/0 .text executeWait__8daE_PZ_cFv */
void daE_PZ_c::executeWait() {
- // NONMATCHING
+ daPy_py_c* sp18 = (daPy_py_c*)dComIfGp_getPlayer(0);
+ fopAc_ac_c* sp14 = NULL;
+
+ cXyz sp88;
+ cXyz sp7C;
+ cXyz sp70;
+ cXyz sp64;
+
+ int var_r29;
+ int var_r28;
+
+ if (field_0x7d3 == 0) {
+ switch (mMoveMode) {
+ case 0:
+ field_0x847 = 0;
+ field_0x848 = 0;
+ mPointerSet();
+ current.pos.set(mPointPos[mCurrentPoint]);
+ mEntrySUB(true);
+ setBck(8, 0, 3.0f, -1.0f);
+ mPzScale.set(0.0f, field_0x7cc, 0.0f);
+ mpModelMorf->setFrame(0.0f);
+ mMoveMode++;
+ break;
+ case 21:
+ current.angle.y = fopAcM_searchPlayerAngleY(this);
+ mEntrySUB(true);
+ case 1:
+ mCylCollider.OnTgSetBit();
+ if (mPzScaleSet(0)) {
+ var_r29 = 0;
+ var_r28 = 0;
+
+ for (int i = var_r28; var_r29 < 25; var_r29++) {
+ if (field_0x7dc[var_r29] == 0) {
+ var_r28++;
+ } else if (!fopAcM_SearchByID(field_0x7dc[var_r29], &sp14) || sp14 == NULL) {
+ field_0x7dc[var_r29] = 0;
+ var_r28++;
+ }
+ }
+
+ if (var_r28 == var_r29) {
+ field_0x84c = 0;
+ field_0x843 = 0;
+ } else {
+ field_0x84c++;
+ if (field_0x84c > 10) {
+ field_0x84c = 10;
+ }
+ }
+
+ mCylCollider.OnCoSetBit();
+ setBck(8, 0, 0.0f, 1.0f);
+ mPzScale.set(l_HIO.body_model_size, l_HIO.body_model_size, l_HIO.body_model_size);
+ mMoveMode++;
+ }
+ break;
+ case 2:
+ if (sp18->checkWolfLock(this)) {
+ field_0x7d3 = l_HIO.after_attack_wait_time;
+ setBck(0x15, 2, 3.0f, 1.0f);
+ mMoveMode = 10;
+ break;
+ }
+ case 22:
+ if (mpModelMorf->isStop()) {
+ if (mMoveMode == 22) {
+ mMoveMode = 30;
+ break;
+ }
+
+ if (field_0x84c == 0 && (parentActorID == 0 || !fopAcM_SearchByID(parentActorID, &sp14) || sp14 == NULL)) {
+ parentActorID = 0;
+ setActionMode(ACTION_ATTACK_e, 0);
+ break;
+ }
+
+ field_0x7d3 = l_HIO.after_attack_wait_time;
+ setBck(0x15, 2, 3.0f, 1.0f);
+ mMoveMode = 10;
+ }
+ break;
+ case 10:
+ case 30:
+ mCylCollider.OffTgSetBit();
+ mCylCollider.OffCoSetBit();
+ setBck(0x13, 0, 3.0f, 1.0f);
+ mMoveMode++;
+ break;
+ case 11:
+ case 31:
+ if (!mpModelMorf->isStop()) {
+ break;
+ }
+
+ mMoveMode++;
+ case 12:
+ case 32:
+ if (mPzScaleSet(1)) {
+ field_0x7d3 = 10;
+ mEntrySUB(false);
+ mPzScale.set(0.0f, 0.0f, 0.0f);
+
+ if (field_0x847 == 0 && mMoveMode == 12) {
+ setActionMode(ACTION_WAIT_e, 0);
+ break;
+ }
+
+ if (mMoveMode == 12) {
+ mMoveMode = 20;
+ break;
+ }
+
+ field_0x78c++;
+ mPointerSet();
+
+ if (field_0x78c < mPointNum - 1) {
+ current.pos.set(field_0x708[mCurrentPoint]);
+ setBck(8, 0, 3.0f, -1.0f);
+ mPzScale.set(0.0f, field_0x7cc, 0.0f);
+ mpModelMorf->setFrame(0.0f);
+ mMoveMode = 21;
+ break;
+ }
+
+ current.pos.set(field_0x708[mCurrentPoint]);
+ mEntrySUB(true);
+ setBck(8, 0, 3.0f, -1.0f);
+
+ mPzScale.set(0.0f, field_0x7cc, 0.0f);
+ field_0x78c = 0;
+ field_0x847 = 0;
+ mpModelMorf->setFrame(0.0f);
+ mMoveMode = 1;
+ }
+ break;
+ case 20:
+ sp70.set(field_0x708[mCurrentPoint]);
+
+ for (var_r29 = 0; var_r29 < mPointNum; var_r29++) {
+ field_0x708[var_r29].set(mPointPos[var_r29]);
+ }
+
+ var_r29 = 0;
+ var_r28 = 1;
+ int spC = var_r28;
+
+ while (var_r29 < mPointNum - 1) {
+ sp88 = field_0x708[var_r29] - sp18->current.pos;
+ sp7C = field_0x708[var_r28] - sp18->current.pos;
+
+ if (sp88.abs() > sp7C.abs()) {
+ sp7C.set(field_0x708[var_r29]);
+ field_0x708[var_r29].set(field_0x708[var_r28]);
+ field_0x708[var_r28].set(sp7C);
+ }
+
+ var_r28++;
+ if (var_r28 >= mPointNum) {
+ var_r29++;
+ var_r28 = var_r29 + 1;
+ }
+ }
+
+ attention_info.distances[fopAc_attn_BATTLE_e] = 3;
+ mPointerSet();
+ field_0x78c = 0;
+
+ sp88 = field_0x708[mCurrentPoint] - current.pos;
+ sp88.y = 0.0f;
+
+ sp7C = sp70 - current.pos;
+ sp7C.y = 0.0f;
+
+ sp64 = field_0x708[mCurrentPoint] - field_0x790;
+ sp64.y = 0.0f;
+
+ if (!sp88.abs() || !sp7C.abs() || !sp64.abs()) {
+ mCurrentPoint++;
+ if (mCurrentPoint >= mPointNum) {
+ setActionMode(ACTION_WAIT_e, 0);
+ break;
+ }
+ }
+
+ current.pos.set(field_0x708[mCurrentPoint]);
+ setBck(8, 0, 3.0f, -1.0f);
+ mPzScale.set(0.0f, field_0x7cc, 0.0f);
+ mpModelMorf->setFrame(0.0f);
+ mMoveMode++;
+ }
+
+ s16 sp8 = fopAcM_searchPlayerAngleY(this);
+ if (field_0x84c == 0) {
+ sp88.set(0.0f, 0.0f, -1500.0f);
+ sp7C = sp88 - current.pos;
+ sp8 = (s16)sp7C.atan2sX_Z();
+ }
+
+ cLib_addCalcAngleS2(&current.angle.y, (s16)sp8, 4, 0x800);
+ }
}
-/* ############################################################################################## */
-/* 8076168C-80761690 000190 0004+00 0/1 0/0 0/0 .rodata @5001 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5001 = -100.0f;
-COMPILER_STRIP_GATE(0x8076168C, &lit_5001);
-#pragma pop
-
-/* 80761690-80761694 000194 0004+00 0/0 0/0 0/0 .rodata @5002 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5002 = -3300.0f;
-COMPILER_STRIP_GATE(0x80761690, &lit_5002);
-#pragma pop
-
-/* 80761694-80761698 000198 0004+00 0/0 0/0 0/0 .rodata @5003 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5003 = -3000.0f;
-COMPILER_STRIP_GATE(0x80761694, &lit_5003);
-#pragma pop
-
-/* 80761698-8076169C 00019C 0004+00 0/0 0/0 0/0 .rodata @5004 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5004 = 0.5f;
-COMPILER_STRIP_GATE(0x80761698, &lit_5004);
-#pragma pop
-
-/* 8076169C-807616A0 0001A0 0004+00 0/0 0/0 0/0 .rodata @5005 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5005 = 1000.0f;
-COMPILER_STRIP_GATE(0x8076169C, &lit_5005);
-#pragma pop
-
-/* 807616A0-807616A4 0001A4 0004+00 0/1 0/0 0/0 .rodata @5006 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5006 = 140.0f;
-COMPILER_STRIP_GATE(0x807616A0, &lit_5006);
-#pragma pop
-
-/* 807616A4-807616A8 0001A8 0004+00 0/2 0/0 0/0 .rodata @5007 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5007 = -1300.0f;
-COMPILER_STRIP_GATE(0x807616A4, &lit_5007);
-#pragma pop
-
-/* 807616A8-807616AC 0001AC 0004+00 0/0 0/0 0/0 .rodata @5008 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5008 = -70.0f;
-COMPILER_STRIP_GATE(0x807616A8, &lit_5008);
-#pragma pop
-
-/* 807616AC-807616B0 0001B0 0004+00 0/1 0/0 0/0 .rodata @5009 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5009 = 250.0f;
-COMPILER_STRIP_GATE(0x807616AC, &lit_5009);
-#pragma pop
-
-/* 807616B0-807616B4 0001B4 0004+00 0/0 0/0 0/0 .rodata @5010 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5010 = -950.0f;
-COMPILER_STRIP_GATE(0x807616B0, &lit_5010);
-#pragma pop
-
-/* 807616B4-807616B8 0001B8 0004+00 0/0 0/0 0/0 .rodata @5011 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5011 = -700.0f;
-COMPILER_STRIP_GATE(0x807616B4, &lit_5011);
-#pragma pop
-
-/* 807616B8-807616BC 0001BC 0004+00 0/0 0/0 0/0 .rodata @5012 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5012 = -800.0f;
-COMPILER_STRIP_GATE(0x807616B8, &lit_5012);
-#pragma pop
-
-/* 807616BC-807616C0 0001C0 0004+00 0/0 0/0 0/0 .rodata @5013 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5013 = -300.0f;
-COMPILER_STRIP_GATE(0x807616BC, &lit_5013);
-#pragma pop
-
-/* 807616C0-807616C4 0001C4 0004+00 0/1 0/0 0/0 .rodata @5014 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5014 = -1200.0f;
-COMPILER_STRIP_GATE(0x807616C0, &lit_5014);
-#pragma pop
-
-/* 807616C4-807616C8 0001C8 0004+00 0/0 0/0 0/0 .rodata @5015 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5015 = -2600.0f;
-COMPILER_STRIP_GATE(0x807616C4, &lit_5015);
-#pragma pop
-
-/* 807616C8-807616CC 0001CC 0004+00 0/0 0/0 0/0 .rodata @5016 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5016 = 6.0f;
-COMPILER_STRIP_GATE(0x807616C8, &lit_5016);
-#pragma pop
-
-/* 807616CC-807616D4 0001D0 0004+04 0/0 0/0 0/0 .rodata @5017 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5017[1 + 1 /* padding */] = {
- -2850.0f,
- /* padding */
- 0.0f,
-};
-COMPILER_STRIP_GATE(0x807616CC, &lit_5017);
-#pragma pop
-
-/* 807616D4-807616DC 0001D8 0008+00 1/1 0/0 0/0 .rodata @5083 */
-SECTION_RODATA static u8 const lit_5083[8] = {
- 0x43, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
-};
-COMPILER_STRIP_GATE(0x807616D4, &lit_5083);
-
-/* 807616DC-807616E0 0001E0 0004+00 0/1 0/0 0/0 .rodata @5608 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5608 = 2.0f / 5.0f;
-COMPILER_STRIP_GATE(0x807616DC, &lit_5608);
-#pragma pop
-
/* 8075C6AC-8075CB80 00422C 04D4+00 1/1 0/0 0/0 .text executeAttack__8daE_PZ_cFv */
void daE_PZ_c::executeAttack() {
- // NONMATCHING
+ int sp20 = 20;
+
+ switch (mMoveMode) {
+ case 0:
+ if ((cM_rnd() < 0.4f && arg0 != 0) || BREG_S(2) != 0) {
+ setBck(0xA, 0, 3.0f, 1.0f);
+ } else {
+ setBck(0xB, 0, 3.0f, 1.0f);
+ field_0x5dc.startCreatureVoice(Z2SE_EN_PZ_V_ATK_RDY, -1);
+ }
+ mMoveMode++;
+ break;
+ case 1:
+ if (mpModelMorf->isStop()) {
+ parentActorID = fopAcM_createChild(PROC_E_PZ, fopAcM_GetID(this), sp20 + arg0, &field_0x7a8, fopAcM_GetRoomNo(this), &shape_angle, NULL, -1, NULL);
+
+ if (mAnm == 0xB) {
+ setBck(0xC, 0, 3.0f, 1.0f);
+
+ u8 sp10;
+ int var_r27 = 0;
+ sp10 = field_0x7d8;
+
+ while (sp10 == field_0x7d8 && var_r27 < 100) {
+ u8 var_r28;
+ if (arg0 == 1) {
+ var_r28 = 1.0f + cM_rndF(3.0f);
+ if (var_r28 >= 4) {
+ var_r28 = 1;
+ }
+ } else {
+ var_r28 = cM_rndF(3.0f);
+ if (var_r28 >= 3) {
+ sp10 = 2;
+ }
+ }
+
+ var_r27++;
+ if (data_80761E29 != var_r28) {
+ field_0x7d8 = var_r28;
+ var_r27 = 100;
+ }
+ }
+ } else {
+ field_0x7d8 = 5;
+ setBck(9, 0, 3.0f, 1.0f);
+ }
+
+ if (BREG_S(1) != 0) {
+ field_0x7d8 = BREG_S(1) - 1;
+ }
+ if (field_0x7d8 > 5) {
+ field_0x7d8 = 5;
+ }
+ mMoveMode++;
+ }
+ break;
+ case 2:
+ if ((mAnm == 0xC && (int)mpModelMorf->getFrame() == 34) || (mAnm == 9 && (int)mpModelMorf->getFrame() == 20)) {
+ field_0x5dc.startCreatureVoice(Z2SE_EN_PZ_V_ATK_TRW, -1);
+ }
+
+ fopAc_ac_c* sp24;
+ if (fopAcM_SearchByID(parentActorID, &sp24) && sp24 != NULL) {
+ if ((int)mpModelMorf->getFrame() == 36 || (field_0x7d8 == 5 && (int)mpModelMorf->getFrame() == 23)) {
+ ((daE_PZ_c*)sp24)->mMoveMode = 1;
+
+ if (field_0x7d8 != 5) {
+ dComIfGp_particle_set(0x889D, &sp24->current.pos, &shape_angle, NULL);
+ }
+ } else {
+ if ((int)mpModelMorf->getFrame() < 36 && (field_0x7d8 != 5)) {
+ sp24->current.pos.set(field_0x7a8);
+ }
+ }
+ }
+ if (mpModelMorf->isStop()) {
+ setBck(0x15, 2, 3.0f, 1.0f);
+ field_0x7d3 = 0;
+ setActionMode(ACTION_WAIT_e, 10);
+ }
+ break;
+ }
+
+ fopAc_ac_c* player = dComIfGp_getPlayer(0);
+ cXyz sp40;
+ cXyz sp34;
+
+ if (mAnm == 0xB || mAnm == 0xC) {
+ sp40.set(0.0f, 0.0f, -1500.0f);
+ } else {
+ sp40.set(player->current.pos);
+ }
+
+ sp34 = sp40 - current.pos;
+ cLib_addCalcAngleS2(&current.angle.y, (s16)sp34.atan2sX_Z(), 4, 0x800);
}
-/* ############################################################################################## */
-/* 807616E0-807616E4 0001E4 0004+00 0/1 0/0 0/0 .rodata @5672 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5672 = -40.0f;
-COMPILER_STRIP_GATE(0x807616E0, &lit_5672);
-#pragma pop
-
/* 8075CB80-8075CE68 004700 02E8+00 1/1 0/0 0/0 .text executeDamage__8daE_PZ_cFv */
void daE_PZ_c::executeDamage() {
- // NONMATCHING
+ switch (mMoveMode) {
+ case 0:
+ setBck(0xE, 0, 3.0f, 1.0f);
+ mPzScale.set(l_HIO.body_model_size, l_HIO.body_model_size, l_HIO.body_model_size);
+ field_0x5dc.startCreatureVoice(Z2SE_EN_PZ_V_DMG, -1);
+ mMoveMode = 1;
+ return;
+ case 2:
+ if (field_0x847 == 4) {
+ setBck(0xE, 0, 3.0f, 1.0f);
+ } else {
+ setBck(0xF, 0, 3.0f, 1.0f);
+ }
+
+ field_0x5dc.startCreatureVoice(Z2SE_EN_PZ_V_DMG, -1);
+ mPzScale.set(l_HIO.body_model_size, l_HIO.body_model_size, l_HIO.body_model_size);
+ mMoveMode = 1;
+ return;
+ case 3:
+ if (field_0x847 == 4) {
+ setBck(0xE, 0, 3.0f, 1.0f);
+ } else {
+ setBck(0x10, 0, 3.0f, 1.0f);
+ }
+
+ mPzScale.set(l_HIO.body_model_size, l_HIO.body_model_size, l_HIO.body_model_size);
+ field_0x5dc.startCreatureVoice(Z2SE_EN_PZ_V_DMG, -1);
+ mMoveMode = 1;
+ return;
+ case 1:
+ if (field_0x847 >= 4) {
+ speedF = -40.0f;
+ mCylCollider.OffTgSetBit();
+ mCylCollider.OffCoSetBit();
+ field_0x7d0 = 14;
+ field_0x847 = 0;
+ mMoveMode = 4;
+ } else if (mpModelMorf->isStop()) {
+ field_0x847 = 0;
+ setActionMode(ACTION_WAIT_e, 10);
+ }
+ break;
+ case 4:
+ cLib_addCalc0(&speedF, 0.8f, 5.0f);
+
+ if (field_0x7d0 == 0 && mPzScaleSet(1)) {
+ field_0x7d3 = 10;
+ speedF = 0.0f;
+ current.pos.set(field_0x790);
+ mEntrySUB(false);
+ mPzScale.zero();
+ setActionMode(ACTION_WAIT_e, 20);
+ }
+ break;
+ }
}
-/* ############################################################################################## */
-/* 807616E4-807616E8 0001E8 0004+00 0/1 0/0 0/0 .rodata @5974 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5974 = 215.0f;
-COMPILER_STRIP_GATE(0x807616E4, &lit_5974);
-#pragma pop
-
-/* 807616E8-807616EC 0001EC 0004+00 0/1 0/0 0/0 .rodata @5975 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5975 = 880.0f;
-COMPILER_STRIP_GATE(0x807616E8, &lit_5975);
-#pragma pop
-
-/* 807616EC-807616F0 0001F0 0004+00 0/2 0/0 0/0 .rodata @5976 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5976 = 400.0f;
-COMPILER_STRIP_GATE(0x807616EC, &lit_5976);
-#pragma pop
-
-/* 80762194-807621A4 0003DC 000C+04 0/1 0/0 0/0 .bss @5677 */
-#pragma push
-#pragma force_active on
-static u8 lit_5677[12 + 4 /* padding */];
-#pragma pop
-
-/* 807621A4-807621B0 0003EC 000C+00 0/1 0/0 0/0 .bss @5680 */
-#pragma push
-#pragma force_active on
-static u8 lit_5680[12];
-#pragma pop
-
-/* 807621B0-807621BC 0003F8 000C+00 0/1 0/0 0/0 .bss @5681 */
-#pragma push
-#pragma force_active on
-static u8 lit_5681[12];
-#pragma pop
-
-/* 807621BC-807621E0 000404 0024+00 0/1 0/0 0/0 .bss mPzDeadDemo_mCenter_dt$5676 */
-#pragma push
-#pragma force_active on
-static u8 mPzDeadDemo_mCenter_dt[36];
-#pragma pop
-
-/* 807621E0-807621F0 000428 000C+04 0/1 0/0 0/0 .bss @5683 */
-#pragma push
-#pragma force_active on
-static u8 lit_5683[12 + 4 /* padding */];
-#pragma pop
-
-/* 807621F0-807621FC 000438 000C+00 0/1 0/0 0/0 .bss @5686 */
-#pragma push
-#pragma force_active on
-static u8 lit_5686[12];
-#pragma pop
-
-/* 807621FC-80762208 000444 000C+00 0/1 0/0 0/0 .bss @5687 */
-#pragma push
-#pragma force_active on
-static u8 lit_5687[12];
-#pragma pop
-
-/* 80762208-8076222C 000450 0024+00 0/1 0/0 0/0 .bss mPzDeadDemo_mEye_dt$5682 */
-#pragma push
-#pragma force_active on
-static u8 mPzDeadDemo_mEye_dt[36];
-#pragma pop
-
/* 8075CE68-8075D94C 0049E8 0AE4+00 2/1 0/0 0/0 .text executeDead__8daE_PZ_cFv */
void daE_PZ_c::executeDead() {
- // NONMATCHING
+ camera_class* sp1C = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0));
+ camera_class* sp18 = dComIfGp_getCamera(0);
+ fopAc_ac_c* sp14 = dComIfGp_getPlayer(0);
+ cXyz sp68;
+ cXyz sp5C;
+
+ static cXyz mPzDeadDemo_mCenter_dt[] = {
+ cXyz(0.0f, 150.0f, 0.0f),
+ cXyz(0.0f, 200.0f, 0.0f),
+ cXyz(30.0f, 215.0f, -600.0f),
+ };
+
+ static cXyz mPzDeadDemo_mEye_dt[] = {
+ cXyz(-100.0f, 100.0f, 200.0f),
+ cXyz(0.0f, 100.0f, 200.0f),
+ cXyz(220.0f, 880.0f, 400.0f),
+ };
+
+ mPzScale.set(l_HIO.body_model_size, l_HIO.body_model_size, l_HIO.body_model_size);
+
+ switch (mMoveMode) {
+ case 0:
+ case 10:
+ field_0x7d0 = 0;
+ if (!eventInfo.i_checkCommandDemoAccrpt()) {
+ fopAcM_orderPotentialEvent(this, 2, 0xFFFF, 0);
+ eventInfo.i_onCondition(2);
+ mDemoCameraEye = sp18->lookat.eye;
+ mDemoCameraCenter = sp18->lookat.center;
+
+ speedF = 0.0f;
+ mCylCollider.ClrTgHit();
+ mCylCollider.ClrCoHit();
+
+ field_0x84c = 7;
+ field_0x843 = 0;
+ fopAcM_OffStatus(this, 0);
+ fopAcM_SetGroup(this, 0);
+ attention_info.flags &= ~4;
+ break;
+ }
+
+ sp1C->mCamera.Stop();
+ sp1C->mCamera.SetTrimSize(3);
+
+ current.pos.set(0.0f, 0.0f, -1300.0f);
+ sp68.set(0.0f, 0.0f, 300.0f);
+ daPy_getPlayerActorClass()->setPlayerPosAndAngle(&sp68, -0x7C00, 0);
+ daPy_getPlayerActorClass()->changeOriginalDemo();
+ daPy_getPlayerActorClass()->changeDemoMode(4, 2, 0, 0);
+
+ sp68.set(0.0f, 0.0f, -1200.0f);
+ sp5C = sp68 - current.pos;
+ shape_angle.y = current.angle.y = sp5C.atan2sX_Z();
+
+ field_0x7d0 = 2;
+ setBck(0x12, 0, 3.0f, 1.0f);
+ field_0x5dc.startCreatureVoice(Z2SE_EN_PZ_V_DEAD, -1);
+
+ if (mMoveMode == 0) {
+ field_0x7c4 = mPzDeadDemo_mEye_dt[0].x;
+ } else {
+ field_0x7c4 = mPzDeadDemo_mEye_dt[1].y;
+ }
+
+ cDmr_SkipInfo = 0;
+ mMoveMode++;
+ break;
+ case 1:
+ if ((int)mpModelMorf->getFrame() == 135) {
+ dCam_getBody()->StartBlure(0x46, this, 0.8f, 1.2f);
+ }
+
+ if ((int)mpModelMorf->getFrame() < 170) {
+ cMtx_YrotS(*calc_mtx, shape_angle.y);
+ sp68.x = field_0x7c4;
+ sp68.y = mPzDeadDemo_mEye_dt[0].y;
+ sp68.z = mPzDeadDemo_mEye_dt[0].z;
+ MtxPosition(&sp68, &sp5C);
+ sp5C += current.pos;
+ mDemoCameraEye.set(sp5C);
+
+ sp68.set(current.pos);
+ sp68 += mPzDeadDemo_mCenter_dt[0];
+ mDemoCameraCenter.set(sp68);
+
+ cLib_addCalc2(&field_0x7c4, 100.0f, 0.8f, 1.2f);
+ } else {
+ cMtx_YrotS(*calc_mtx, shape_angle.y);
+ sp68.x = 100.0f;
+ sp68.y = mPzDeadDemo_mEye_dt[0].y;
+ sp68.z = mPzDeadDemo_mEye_dt[0].z + field_0x7c4;
+ MtxPosition(&sp68, &sp5C);
+ sp5C += current.pos;
+ mDemoCameraEye.set(sp5C);
+
+ cLib_addCalc2(&field_0x7c4, 500.0f, 0.8f, 50.0f);
+ }
+
+ if (!mpModelMorf->isStop()) {
+ break;
+ }
+ case 2:
+ for (int i = 0; i < 3; i++) {
+ static u16 eff_delete_id[] = {0x889E, 0x889F, 0x88A0};
+ dComIfGp_particle_set(eff_delete_id[i], &current.pos, NULL, NULL);
+ }
+
+ Z2GetAudioMgr()->seStart(Z2SE_EN_PZ_FOG, &current.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
+
+ sp68.set(current.pos);
+ sp68.y = mAcch.GetGroundH();
+ fopAcM_create(PROC_KYTAG12, 1, &sp68, fopAcM_GetRoomNo(this), NULL, NULL, -1);
+
+ field_0x7c4 = 0.0f;
+ field_0x7d0 = 140;
+ field_0x840 = 1;
+ mMoveMode = 3;
+ case 3:
+ cLib_addCalcPos(&mDemoCameraCenter, mPzDeadDemo_mCenter_dt[2], 0.7f, 10.0f, 5.0f);
+ cLib_addCalcPos(&mDemoCameraEye, mPzDeadDemo_mEye_dt[2], 0.7f, 10.0f, 5.0f);
+
+ if (field_0x7d0 == 0) {
+ if (arg0 == 0) {
+ fopAcM_offSwitch(this, 0x19);
+ fopAcM_offSwitch(this, 0x1A);
+ fopAcM_onSwitch(this, 0x64);
+
+ if (bitSw != 0xFF) {
+ fopAcM_onSwitch(this, bitSw);
+ }
+ } else {
+ fopAcM_offSwitch(this, 0x1B);
+ fopAcM_offSwitch(this, 0x1C);
+ fopAcM_onSwitch(this, 0x65);
+
+ if (bitSw != 0xFF) {
+ fopAcM_onSwitch(this, bitSw);
+ }
+ }
+
+ sp68.set(sp14->current.pos);
+ sp68.y += 100.0f;
+
+ sp1C->mCamera.Reset(sp68, sp68);
+ sp1C->mCamera.Start();
+ sp1C->mCamera.SetTrimSize(0);
+
+ dComIfGp_event_reset();
+ fopAcM_delete(this);
+ }
+ break;
+ case 11:
+ if ((int)mpModelMorf->getFrame() == 135) {
+ dCam_getBody()->StartBlure(0x46, this, 0.8f, 1.2f);
+ }
+
+ if ((int)mpModelMorf->getFrame() < 170) {
+ cMtx_YrotS(*calc_mtx, shape_angle.y);
+ sp68.x = mPzDeadDemo_mEye_dt[1].x;
+ sp68.y = field_0x7c4;
+ sp68.z = mPzDeadDemo_mEye_dt[1].z;
+ MtxPosition(&sp68, &sp5C);
+ sp5C += current.pos;
+ mDemoCameraEye.set(sp5C);
+
+ sp68.set(current.pos);
+ sp68 += mPzDeadDemo_mCenter_dt[1];
+ mDemoCameraCenter.set(sp68);
+
+ if ((int)mpModelMorf->getFrame() >= 125) {
+ cLib_addCalc2(&field_0x7c4, 1000.0f, 0.8f, 2.2f);
+ }
+ } else {
+ cMtx_YrotS(*calc_mtx, shape_angle.y);
+ sp68.x = 100.0f;
+ sp68.y = mPzDeadDemo_mEye_dt[0].y;
+ sp68.z = mPzDeadDemo_mEye_dt[0].z + field_0x7c4;
+ MtxPosition(&sp68, &sp5C);
+ sp5C += current.pos;
+ mDemoCameraEye.set(sp5C);
+
+ cLib_addCalc2(&field_0x7c4, 500.0f, 0.8f, 50.0f);
+ }
+
+ if (mpModelMorf->isStop()) {
+ mMoveMode = 2;
+ }
+ }
+
+ if (mMoveMode >= 1 && mMoveMode != 10) {
+ sp1C->mCamera.Set(mDemoCameraCenter, mDemoCameraEye);
+ }
}
+/* 80761C28-80761C2C 00046C 0004+00 0/0 0/0 0/0 .data eff_seed_id */
+static u16 eff_seed_id[] = {0x88A3, 0x88A4};
+
+/* 80761C2C-80761C34 000470 0006+02 0/1 0/0 0/0 .data eff_summonBall_id */
+static u16 eff_summonBall_id[] = {0x8898, 0x8899, 0x889A};
+
+/* 80761C34-80761C38 000478 0004+00 0/1 0/0 0/0 .data eff_summonBall2_id */
+static u16 eff_summonBall2_id[] = {0x8913, 0x8914};
+
+/* 80761C38-80761C3C 00047C 0004+00 0/0 0/0 0/0 .data eff_summonShoot2_id */
+static u16 eff_summonShoot2_id[] = {0x8911, 0x8912};
+
+static const struct {
+ s16 name;
+ u32 parameters;
+ int unk_0x8;
+} BIRTH_DT[] = {
+ {PROC_E_YK, 0xFFFFFF01, 20},
+ {PROC_E_YG, 0xFFFFFF00, 20},
+ {PROC_E_PZ, 0xFFFF001E, 12},
+ {PROC_E_S1, 0xFFFFEF00, 8},
+ {PROC_E_YH, 0xFF1FFF00, 12},
+ {PROC_E_PZ, 0xFFFFFF28, 3},
+};
+
+/* 80761748-80761760 00024C 0018+00 0/0 0/0 0/0 .rodata mDBaBa_birthAngle_dt */
+static const s16 mDBaBa_birthAngle_dt[] = {
+ 0x0000, 0x2AAA, 0x5554, 0x7FFE, 0xAAA8, 0xD552,
+ 0x1000, 0x3AAA, 0x6554, 0x8FFE, 0xBAA8, 0xE552,
+};
+
+/* 80761760-80761790 000264 0030+00 0/0 0/0 0/0 .rodata mDBaBa_birthHani_dt */
+static const f32 mDBaBa_birthHani_dt[] = {
+ 600.0f,
+ 600.0f,
+ 600.0f,
+ 600.0f,
+ 600.0f,
+ 600.0f,
+ 1800.0f,
+ 1800.0f,
+ 1800.0f,
+ 1800.0f,
+ 1800.0f,
+ 1800.0f,
+};
+
/* 8075D94C-8075F0BC 0054CC 1770+00 2/1 0/0 0/0 .text executeSummonsBullet__8daE_PZ_cFv
*/
void daE_PZ_c::executeSummonsBullet() {
- // NONMATCHING
+ fopAc_ac_c* sp90 = dComIfGp_getPlayer(0);
+ fopAc_ac_c* sp8C;
+ fopAc_ac_c* sp88;
+
+ cXyz spD8(l_HIO.portal_model_size, l_HIO.portal_model_size, l_HIO.portal_model_size);
+ cXyz spCC;
+ cXyz spC0;
+ csXyz sp94;
+
+ u32 sp84 = 0;
+ s16 sp12 = 0;
+
+ if (!fopAcM_SearchByID(parentActorID, &sp8C) || (sp8C != NULL && sp8C->health <= 1)) {
+ field_0x7d0 = 0;
+ mMoveMode = 4;
+ }
+
+ switch (mMoveMode) {
+ case 0:
+ if (field_0x7d0 == 0) {
+ mpBallModelMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("E_PZ", 7), 0, 1.0f, 1.0f, 0.0f, -1.0f);
+
+ for (int i = 0; i < 2; i++) {
+ dComIfGp_particle_set(eff_summonBall_id[i], &current.pos, NULL, NULL);
+ }
+
+ Z2GetAudioMgr()->seStart(Z2SE_EN_PZ_BALL_EMERGE, &current.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
+
+ if (fopAcM_SearchByID(parentActorID, &sp8C) && sp8C != NULL && ((daE_PZ_c*)sp8C)->field_0x7d8 == 2) {
+ field_0x7a8.set(0.0f, 0.0f, -1500.0f);
+ } else {
+ cMtx_YrotS(*calc_mtx, home.angle.y);
+ spCC.x = 0.0f;
+ spCC.y = 0.0f;
+ spCC.z = 300.0f;
+ MtxPosition(&spCC, &spC0);
+ spC0 += current.pos;
+ field_0x7a8.set(spC0);
+ }
+ }
+
+ field_0x7d0 = 200;
+ field_0xa68[0] = dComIfGp_particle_set(field_0xa68[0], eff_summonBall_id[2], &current.pos, NULL, NULL);
+
+ for (int i = 0; i < 2; i++) {
+ field_0xab4[i] = dComIfGp_particle_set(field_0xab4[i], eff_summonBall2_id[i], &current.pos, NULL, NULL);
+ }
+
+ Z2GetAudioMgr()->seStartLevel(Z2SE_EN_PZ_BALL, &current.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
+
+ if (fopAcM_SearchByID(parentActorID, &sp8C) && sp8C != NULL && ((daE_PZ_c*)sp8C)->mAnm != 0xC && ((daE_PZ_c*)sp8C)->mAnm != 0xA && ((daE_PZ_c*)sp8C)->mAnm != 9 && ((daE_PZ_c*)sp8C)->mAnm != 0xD) {
+ field_0x7d0 = 0;
+ mMoveMode = 4;
+ }
+ break;
+ case 1:
+ if (fopAcM_SearchByID(parentActorID, &sp8C) && sp8C != NULL && ((daE_PZ_c*)sp8C)->field_0x7d8 == 5) {
+ for (int i = 0; i < 2; i++) {
+ JPABaseEmitter* sp80 = dComIfGp_particle_getEmitter(field_0xab4[i]);
+ if (sp80 != NULL) {
+ sp80->stopDrawParticle();
+ }
+ }
+
+ for (int i = 0; i < 2; i++) {
+ dComIfGp_particle_set(eff_summonShoot2_id[i], &current.pos, NULL, NULL);
+ }
+
+ sp94 = shape_angle;
+ sp12 = -0x1000;
+
+ for (int i = 0; i < 5; i++) {
+ sp94.x = -fopAcM_searchPlayerAngleX(this);
+ sp94.y = sp12 + fopAcM_searchPlayerAngleY(this);
+ fopAcM_create(BIRTH_DT[((daE_PZ_c*)sp8C)->field_0x7d8].name, BIRTH_DT[((daE_PZ_c*)sp8C)->field_0x7d8].parameters, &current.pos, fopAcM_GetRoomNo(this), &sp94, NULL, -1);
+ sp12 += 0x800;
+ }
+
+ fopAcM_delete(this);
+ break;
+ }
+
+ spCC.set(field_0x7a8);
+ spCC.y += 1000.0f;
+ cLib_addCalcPos(&current.pos, spCC, 0.8f, 100.0f, 40.0f);
+
+ if (field_0xa68[1] == 0) {
+ for (int i = 0; i < 2; i++) {
+ dComIfGp_particle_set(eff_summonShoot2_id[i], &current.pos, NULL, NULL);
+ }
+
+ for (int i = 0; i < 2; i++) {
+ JPABaseEmitter* sp80 = dComIfGp_particle_getEmitter(field_0xab4[i]);
+ if (sp80 != NULL) {
+ sp80->stopDrawParticle();
+ }
+ }
+ }
+
+ field_0xa68[1] = dComIfGp_particle_set(field_0xa68[1], 0x889C, &current.pos, NULL, NULL);
+ Z2GetAudioMgr()->seStartLevel(Z2SE_EN_PZ_BALL, &current.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
+ spC0 = spCC - current.pos;
+
+ if (mAcch.ChkWallHit() || mAcch.ChkGroundHit() || spC0.abs() < 10.0f || field_0x7d0 == 0) {
+ field_0x7d0 = 10;
+ field_0x7c8 = 0.0f;
+ field_0x7d7 = 0;
+
+ dComIfGp_particle_set(0x889B, &current.pos, &shape_angle, &spD8);
+ Z2GetAudioMgr()->seStart(Z2SE_EN_PZ_BALL_BURST, &current.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
+ mMoveMode++;
+ }
+ break;
+ case 2:
+ case 30:
+ if (field_0x842 == 0) {
+ field_0x7c8 = l_HIO.portal_model_size;
+ field_0x842 = 1;
+
+ dComIfGp_particle_set(0x84A4, &current.pos, &shape_angle, &spD8);
+ Z2GetAudioMgr()->seStart(Z2SE_EN_PZ_PT_EMERGE, &current.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
+ field_0x7d0 = 40;
+ }
+
+ Z2GetAudioMgr()->seStartLevel(Z2SE_EN_PZ_PT, &current.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
+
+ if (field_0x7d0 == 0) {
+ sp94.x = 0;
+ sp94.y = fopAcM_searchPlayerAngleY(this);
+ sp94.z = 0;
+
+ sp12 = (field_0x7d7 << 13);
+ if (fopAcM_SearchByID(parentActorID, &sp8C) && sp8C != NULL) {
+ if (((daE_PZ_c*)sp8C)->field_0x7d8 == 2) {
+ sp12 = mDBaBa_birthAngle_dt[field_0x7d7];
+ }
+
+ cMtx_YrotS(*calc_mtx, sp12);
+ spCC.x = 0.0f;
+ spCC.y = -50.0f;
+ spCC.z = 200.0f;
+ if (((daE_PZ_c*)sp8C)->field_0x7d8 == 2) {
+ spCC.y = 200.0f;
+ spCC.z = 10.0f + cM_rndF(800.0f);
+ }
+ MtxPosition(&spCC, &spC0);
+ spC0 += current.pos;
+
+ if (((daE_PZ_c*)sp8C)->field_0x7d8 == 2) {
+ spC0.z += 100.0f;
+ }
+
+ if (((daE_PZ_c*)sp8C)->field_0x7dc[field_0x7d7] == 0) {
+ sp84 = BIRTH_DT[((daE_PZ_c*)sp8C)->field_0x7d8].parameters;
+ data_80761E29 = ((daE_PZ_c*)sp8C)->field_0x7d8;
+
+ if (((daE_PZ_c*)sp8C)->field_0x7d8 == 2) {
+ sp84 |= field_0x7d7 << 8;
+ }
+ if (((daE_PZ_c*)sp8C)->field_0x7d8 == 3) {
+ sp94.z = 0xC8;
+ }
+
+ ((daE_PZ_c*)sp8C)->field_0x7dc[field_0x7d7] = fopAcM_createChild(BIRTH_DT[((daE_PZ_c*)sp8C)->field_0x7d8].name, fopAcM_GetID(this), sp84, &spC0, fopAcM_GetRoomNo(this), &sp94, NULL, -1, NULL);
+ if (((daE_PZ_c*)sp8C)->field_0x7dc[field_0x7d7] != 0) {
+ field_0x7d7++;
+ field_0x7d0 = 2;
+ }
+ }
+
+ if (field_0x7d7 < BIRTH_DT[((daE_PZ_c*)sp8C)->field_0x7d8].unk_0x8) {
+ break;
+ }
+ }
+
+ field_0x7d0 = 100;
+ mMoveMode++;
+ }
+ break;
+ case 22:
+ case 31:
+ Z2GetAudioMgr()->seStartLevel(Z2SE_EN_PZ_PT, &current.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
+ break;
+ case 3:
+ case 32:
+ if (field_0x7d0 != 0) {
+ Z2GetAudioMgr()->seStartLevel(Z2SE_EN_PZ_PT, &current.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
+ break;
+ }
+
+ field_0x5d8 = 1;
+ Z2GetAudioMgr()->seStart(Z2SE_EN_PZ_PT_DISAPPEAR, &current.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
+ field_0x7d0 = 50;
+ mMoveMode++;
+ break;
+ case 4:
+ mpBallBrk->play();
+
+ if (field_0x7d0 == 0) {
+ fopAcM_delete(this);
+ }
+ break;
+ case 33:
+ if (field_0x7d0 == 0) {
+ cLib_addCalc0(&field_0x7c8, 0.7f, 0.5f);
+ if (field_0x7c8 < 0.2f) {
+ fopAcM_delete(this);
+ }
+ }
+ break;
+ case 10:
+ if (arg1 == 0xFF) {
+ fopAcM_delete(this);
+ break;
+ }
+
+ if (fopAcM_SearchByID(parentActorID, &sp8C) && sp8C != NULL && fopAcM_SearchByID(sp8C->parentActorID, &sp88) && sp88 != NULL && ((daE_PZ_c*)sp88)->field_0x841 != 0) {
+ field_0x7d0 = 20;
+ }
+ mMoveMode++;
+ case 11:
+ if (field_0x7d7 == 0) {
+ field_0xa68[0] = dComIfGp_particle_set(field_0xa68[0], 0x88A2, &current.pos, NULL, NULL);
+ }
+
+ sp12 = mDBaBa_birthAngle_dt[arg1];
+ cMtx_YrotS(*calc_mtx, sp12);
+ spCC.x = 0.0f;
+ spCC.y = -100.0f;
+ spCC.z = mDBaBa_birthHani_dt[arg1];
+ MtxPosition(&spCC, &spC0);
+ spC0.z += -1500.0f;
+
+ if (field_0x7d7 == 0) {
+ if (field_0x7d0 != 0) {
+ cLib_addCalc2(&current.pos.y, spC0.y, 0.7f, 50.0f);
+ break;
+ }
+ cLib_addCalcPos(&current.pos, spC0, 0.7f, 100.0f, 50.0f);
+ }
+
+ spCC = current.pos - spC0;
+
+ if (field_0x7d7 != 0 || mAcch.ChkGroundHit() || spCC.abs() < 2.0f) {
+ field_0x7d7++;
+ if (fopAcM_SearchByID(parentActorID, &sp8C) && sp8C != NULL && fopAcM_SearchByID(sp8C->parentActorID, &sp88) && sp88 != NULL) {
+ if (((daE_PZ_c*)sp88)->field_0x841 != 0) {
+ field_0x7d7 = 1;
+
+ if (data_80761E28 == 0) {
+ break;
+ }
+
+ for (int i = 0; i < 2; i++) {
+ spCC.set(current.pos);
+ spCC.y = mAcch.GetGroundH();
+ dComIfGp_particle_set(eff_seed_id[i], &spCC, NULL, NULL);
+ }
+
+ Z2GetAudioMgr()->seStart(Z2SE_EN_PZ_DKBB_SEED, &current.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
+ } else if (field_0x7d7 < 0x1E) {
+ if (field_0x7d7 != 1) {
+ break;
+ }
+
+ spCC.set(current.pos);
+ spCC.y = mAcch.GetGroundH();
+
+ for (int i = 0; i < 2; i++) {
+ dComIfGp_particle_set(eff_seed_id[i], &spCC, NULL, NULL);
+ }
+
+ Z2GetAudioMgr()->seStart(Z2SE_EN_PZ_DKBB_SEED, &current.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
+ break;
+ }
+
+ spC0.set(current.pos);
+ spC0.y = mAcch.GetGroundH();
+
+ s16 sp10 = BIRTH_DT[4].name;
+ u32 sp58 = BIRTH_DT[4].parameters;
+ if (sp88 != NULL) {
+ ((daE_PZ_c*)sp88)->field_0x7dc[arg1] = fopAcM_createChild(sp10, fopAcM_GetID(this), sp58, &spC0, fopAcM_GetRoomNo(this), &current.angle, NULL, -1, NULL);
+ }
+ }
+ fopAcM_delete(this);
+ }
+ break;
+ case 20:
+ field_0x7a8.set(0.0f, 0.0f, -2000.0f);
+
+ spCC.set(sp90->current.pos);
+ spCC.y += 300.0f;
+
+ if (field_0x7d7 < 8) {
+ field_0x7d7++;
+ cLib_addCalcPos(&current.pos, spCC, 0.8f, 100.0f, 40.0f);
+ }
+
+ if (field_0xa68[1] == 0) {
+ for (int i = 0; i < 2; i++) {
+ JPABaseEmitter* sp80 = dComIfGp_particle_getEmitter(field_0xab4[i]);
+ if (sp80 != NULL) {
+ sp80->stopDrawParticle();
+ }
+ }
+
+ for (int i = 0; i < 2; i++) {
+ dComIfGp_particle_set(eff_summonShoot2_id[i], &current.pos, NULL, NULL);
+ }
+ }
+
+ field_0xa68[1] = dComIfGp_particle_set(field_0xa68[1], 0x889C, &current.pos, NULL, NULL);
+ Z2GetAudioMgr()->seStartLevel(Z2SE_EN_PZ_BALL, &current.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
+ break;
+ case 21:
+ spCC.set(field_0x7a8);
+ spCC.y += 1000.0f;
+ cLib_addCalcPos(&current.pos, spCC, 0.8f, 100.0f, 40.0f);
+
+ field_0xa68[1] = dComIfGp_particle_set(field_0xa68[1], 0x889C, &current.pos, NULL, NULL);
+ Z2GetAudioMgr()->seStartLevel(Z2SE_EN_PZ_BALL, &current.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
+
+ spC0 = spCC - current.pos;
+ if (!(spC0.abs() > 10.0f)) {
+ dComIfGp_particle_set(0x889B, &current.pos, &shape_angle, &spD8);
+ Z2GetAudioMgr()->seStart(Z2SE_EN_PZ_BALL_BURST, &current.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
+
+ field_0x7c8 = l_HIO.portal_model_size;
+ field_0x842 = 1;
+
+ dComIfGp_particle_set(0x84A4, &current.pos, &shape_angle, &spD8);
+ Z2GetAudioMgr()->seStart(Z2SE_EN_PZ_PT_EMERGE, &current.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
+
+ field_0x7d7 = 0;
+ field_0x7d0 = 30;
+ mMoveMode++;
+ }
+ }
}
/* 8075F0BC-8075F3A8 006C3C 02EC+00 1/1 0/0 0/0 .text executeBullet__8daE_PZ_cFv */
void daE_PZ_c::executeBullet() {
- // NONMATCHING
+ cXyz mae;
+ cXyz ato;
+
+ switch (mMoveMode) {
+ case 0:
+ speedF = l_HIO.bullet_speed;
+
+ cMtx_YrotS(*calc_mtx, current.angle.y);
+ cMtx_XrotM(*calc_mtx, current.angle.x);
+ mae.x = 0.0f;
+ mae.y = 0.0f;
+ mae.z = speedF;
+ MtxPosition(&mae, &ato);
+ speed.y = ato.y;
+
+ field_0x5dc.startCreatureSound(Z2SE_EN_PZ_FIRE_OUT, 0, -1);
+ field_0x7d0 = 100;
+ mMoveMode++;
+ /* fallthrough */
+ case 1:
+ Z2GetAudioMgr()->seStartLevel(Z2SE_EN_PZ_FIRE, &current.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
+ break;
+ }
+
+ for (int i = 0; i < 3; i++) {
+ static u16 eff_bullet_id[] = {0x8866, 0x8867, 0x8868};
+ field_0xa68[i] = dComIfGp_particle_set(field_0xa68[i], eff_bullet_id[i], &current.pos, NULL, NULL);
+
+ JPABaseEmitter* emitter = dComIfGp_particle_getEmitter(field_0xa68[i]);
+ if (emitter != NULL) {
+ emitter->setGlobalTranslation(current.pos);
+ }
+ }
+
+ if (mAcch.ChkWallHit() || mAcch.ChkGroundHit() || field_0x7d0 == 0 || mBulletAtCollider.ChkAtHit() || mBulletAtCollider.ChkTgHit() || mBulletAtCollider.ChkAtShieldHit()) {
+ for (int i = 0; i < 4; i++) {
+ static u16 eff_bullet_delete_id[] = {0x8862, 0x8863, 0x8864, 0x8865};
+ dComIfGp_particle_set(eff_bullet_delete_id[i], &current.pos, NULL, NULL);
+ }
+
+ Z2GetAudioMgr()->seStart(Z2SE_EN_PZ_FIRE_BURST, &current.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
+ fopAcM_delete(this);
+ }
}
/* 8075F3A8-8075F510 006F28 0168+00 1/1 0/0 0/0 .text action__8daE_PZ_cFv */
void daE_PZ_c::action() {
- // NONMATCHING
+ field_0x7cc = l_HIO.body_model_size * (3.0f + BREG_F(1));
+ damage_check();
+
+ switch (mActionMode) {
+ case ACTION_SEARCH_POINT_e:
+ executeSearchPoint();
+ break;
+ case ACTION_OPENING_DEMO_e:
+ executeOpeningDemo();
+ break;
+ case ACTION_WAIT_e:
+ executeWait();
+ break;
+ case ACTION_ATTACK_e:
+ executeAttack();
+ break;
+ case ACTION_DAMAGE_e:
+ executeDamage();
+ break;
+ case ACTION_DEAD_e:
+ executeDead();
+ break;
+ }
+
+ if (NREG_S(1) != 0) {
+ OS_REPORT("mActionMode %d\n", mActionMode);
+ OS_REPORT("mMoveMode %d\n", mMoveMode);
+ }
+
+ mEnemyScaleSet();
+
+ if (arg0 >= 10 || attention_info.distances[fopAc_attn_BATTLE_e] != 0) {
+ if (mActionMode != ACTION_DEAD_e) {
+ shape_angle.y = current.angle.y;
+ }
+
+ fopAcM_posMoveF(this, mColliderStts.GetCCMoveP());
+
+ if (mActionMode != ACTION_OPENING_DEMO_e || mMoveMode < 100) {
+ mAcch.SetGroundUpY(field_0x7bc);
+ mAcch.CrrPos(dComIfG_Bgsp());
+ }
+
+ mpPzBrk->play();
+ mpPzBtk->play();
+ mpModelMorf->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo(this)));
+ }
}
/* 8075F510-8075F578 007090 0068+00 1/1 0/0 0/0 .text action_fire__8daE_PZ_cFv */
void daE_PZ_c::action_fire() {
- // NONMATCHING
+ if (mActionMode == 6) {
+ executeSummonsBullet();
+ } else {
+ executeBullet();
+ }
+
+ shape_angle.y = current.angle.y;
+ fopAcM_posMoveF(this, mColliderStts.GetCCMoveP());
+ mAcch.CrrPos(dComIfG_Bgsp());
}
/* 8075F578-8075F734 0070F8 01BC+00 1/1 0/0 0/0 .text fire_mtx_set__8daE_PZ_cFv */
void daE_PZ_c::fire_mtx_set() {
- // NONMATCHING
+ if (arg0 >= 20 && arg0 <= 23) {
+ mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z);
+ mDoMtx_stack_c::scaleM(field_0x7c8, field_0x7c8, field_0x7c8);
+
+ cXyz sp8(10.0f + BREG_F(8), 10.0f + BREG_F(8), 10.0f + BREG_F(8));
+
+ if (field_0x842 != 0) {
+ for (int i = 0; i < 2; i++) {
+ static u16 eff_darkHoll_id[] = {0x84A6, 0x84A7};
+ field_0xa74[i] = dComIfGp_particle_set(field_0xa74[i], eff_darkHoll_id[i], &current.pos, &shape_angle, &sp8);
+ }
+
+ mpPortalModel->setBaseTRMtx(mDoMtx_stack_c::get());
+ mpPortalBtk->play();
+ mpPortalBrk[field_0x5d8]->play();
+ } else {
+ mpBallModelMorf->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo(this)));
+ mpBallModelMorf->getModel()->setBaseTRMtx(mDoMtx_stack_c::get());
+ mpBallModelMorf->modelCalc();
+ }
+ }
+
+ if (mActionMode == 7) {
+ mBulletAtCollider.SetC(current.pos);
+ mBulletAtCollider.SetR(30.0f);
+ dComIfG_Ccsp()->Set(&mBulletAtCollider);
+ }
}
/* 8075F734-8075F7E8 0072B4 00B4+00 1/1 0/0 0/0 .text mtx_set__8daE_PZ_cFv */
void daE_PZ_c::mtx_set() {
- // NONMATCHING
-}
+ mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z);
+ mDoMtx_stack_c::ZXYrotM(shape_angle);
+ mDoMtx_stack_c::transM(0.0f, field_0x7c0, 0.0f);
-/* ############################################################################################## */
-/* 807616F0-807616F4 0001F4 0004+00 0/0 0/0 0/0 .rodata @5977 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5977 = 6.0f / 5.0f;
-COMPILER_STRIP_GATE(0x807616F0, &lit_5977);
-#pragma pop
-
-/* 807616F4-807616F8 0001F8 0004+00 0/0 0/0 0/0 .rodata @5978 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5978 = 500.0f;
-COMPILER_STRIP_GATE(0x807616F4, &lit_5978);
-#pragma pop
-
-/* 807616F8-807616FC 0001FC 0004+00 0/1 0/0 0/0 .rodata @5979 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5979 = 50.0f;
-COMPILER_STRIP_GATE(0x807616F8, &lit_5979);
-#pragma pop
-
-/* 807616FC-80761700 000200 0004+00 0/0 0/0 0/0 .rodata @5980 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5980 = 11.0f / 5.0f;
-COMPILER_STRIP_GATE(0x807616FC, &lit_5980);
-#pragma pop
-
-/* 80761700-80761748 000204 0048+00 0/0 0/0 0/0 .rodata BIRTH_DT */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static u8 const BIRTH_DT[72] = {
- 0x01, 0xF9, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x14, 0x01, 0xFB, 0x00,
- 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x14, 0x01, 0xE4, 0x00, 0x00, 0xFF, 0xFF,
- 0x00, 0x1E, 0x00, 0x00, 0x00, 0x0C, 0x01, 0xB4, 0x00, 0x00, 0xFF, 0xFF, 0xEF, 0x00, 0x00,
- 0x00, 0x00, 0x08, 0x01, 0xCD, 0x00, 0x00, 0xFF, 0x1F, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x0C,
- 0x01, 0xE4, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x28, 0x00, 0x00, 0x00, 0x03,
-};
-COMPILER_STRIP_GATE(0x80761700, &BIRTH_DT);
-#pragma pop
+ if (l_HIO.body_model_size != 1.0f) {
+ mPzScale.set(l_HIO.body_model_size, l_HIO.body_model_size, l_HIO.body_model_size);
+ }
-/* 80761748-80761760 00024C 0018+00 0/0 0/0 0/0 .rodata mDBaBa_birthAngle_dt */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static u8 const mDBaBa_birthAngle_dt[24] = {
- 0x00, 0x00, 0x2A, 0xAA, 0x55, 0x54, 0x7F, 0xFE, 0xAA, 0xA8, 0xD5, 0x52,
- 0x10, 0x00, 0x3A, 0xAA, 0x65, 0x54, 0x8F, 0xFE, 0xBA, 0xA8, 0xE5, 0x52,
-};
-COMPILER_STRIP_GATE(0x80761748, &mDBaBa_birthAngle_dt);
-#pragma pop
-
-/* 80761760-80761790 000264 0030+00 0/0 0/0 0/0 .rodata mDBaBa_birthHani_dt */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static u8 const mDBaBa_birthHani_dt[48] = {
- 0x44, 0x16, 0x00, 0x00, 0x44, 0x16, 0x00, 0x00, 0x44, 0x16, 0x00, 0x00, 0x44, 0x16, 0x00, 0x00,
- 0x44, 0x16, 0x00, 0x00, 0x44, 0x16, 0x00, 0x00, 0x44, 0xE1, 0x00, 0x00, 0x44, 0xE1, 0x00, 0x00,
- 0x44, 0xE1, 0x00, 0x00, 0x44, 0xE1, 0x00, 0x00, 0x44, 0xE1, 0x00, 0x00, 0x44, 0xE1, 0x00, 0x00,
-};
-COMPILER_STRIP_GATE(0x80761760, &mDBaBa_birthHani_dt);
-#pragma pop
-
-/* 80761790-80761794 000294 0004+00 0/0 0/0 0/0 .rodata @6712 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_6712 = -2000.0f;
-COMPILER_STRIP_GATE(0x80761790, &lit_6712);
-#pragma pop
-
-/* 80761794-80761798 000298 0004+00 0/1 0/0 0/0 .rodata @6935 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_6935 = -120.0f;
-COMPILER_STRIP_GATE(0x80761794, &lit_6935);
-#pragma pop
+ mDoMtx_stack_c::scaleM(mPzScale.x, mPzScale.y, mPzScale.z);
+ mpModelMorf->getModel()->setBaseTRMtx(mDoMtx_stack_c::get());
+ mpModelMorf->modelCalc();
+}
/* 8075F7E8-8075F964 007368 017C+00 1/1 0/0 0/0 .text cc_set__8daE_PZ_cFv */
void daE_PZ_c::cc_set() {
- // NONMATCHING
-}
-
-/* 8075F964-8075FA60 0074E4 00FC+00 1/1 0/0 0/0 .text execute__8daE_PZ_cFv */
-void daE_PZ_c::execute() {
- // NONMATCHING
-}
+ cXyz mae;
+ cXyz ato;
-/* 8075FA60-8075FA80 0075E0 0020+00 2/1 0/0 0/0 .text daE_PZ_Execute__FP8daE_PZ_c */
-static void daE_PZ_Execute(daE_PZ_c* param_0) {
- // NONMATCHING
-}
+ J3DModel* model_p = mpModelMorf->getModel();
+ mDoMtx_stack_c::copy(model_p->getAnmMtx(0));
-/* 8075FA80-8075FA88 007600 0008+00 1/0 0/0 0/0 .text daE_PZ_IsDelete__FP8daE_PZ_c */
-static bool daE_PZ_IsDelete(daE_PZ_c* param_0) {
- return true;
-}
+ mae.set(300.0f + JREG_F(0), 0.0f, 0.0f);
+ mDoMtx_stack_c::multVec(&mae, &field_0x7a8);
-/* 8075FA88-8075FB2C 007608 00A4+00 1/1 0/0 0/0 .text _delete__8daE_PZ_cFv */
-void daE_PZ_c::_delete() {
- // NONMATCHING
-}
+ if (field_0x841 == 0) {
+ mDoMtx_stack_c::multVecZero(&eyePos);
+ attention_info.position = eyePos;
+ attention_info.position.y += 140.0f + BREG_F(7);
+ }
-/* 8075FB2C-8075FB4C 0076AC 0020+00 1/0 0/0 0/0 .text daE_PZ_Delete__FP8daE_PZ_c */
-static void daE_PZ_Delete(daE_PZ_c* param_0) {
- // NONMATCHING
-}
+ mDoMtx_stack_c::copy(model_p->getAnmMtx(0));
+ mae.set(-120.0f + BREG_F(9), 10.0f + BREG_F(10), BREG_F(11));
+ mDoMtx_stack_c::multVec(&mae, &ato);
-/* 8075FB4C-807600A4 0076CC 0558+00 1/1 0/0 0/0 .text CreateHeap__8daE_PZ_cFv */
-void daE_PZ_c::CreateHeap() {
- // NONMATCHING
-}
+ mCylCollider.SetC(ato);
+ mCylCollider.SetH(250.0f + BREG_F(12));
+ mCylCollider.SetR(50.0f + BREG_F(13));
+ dComIfG_Ccsp()->Set(&mCylCollider);
-/* 807600A4-807600EC 007C24 0048+00 1/0 0/0 0/0 .text __dt__12J3DFrameCtrlFv */
-// J3DFrameCtrl::~J3DFrameCtrl() {
-extern "C" void __dt__12J3DFrameCtrlFv() {
- // NONMATCHING
-}
-
-/* 807600EC-8076010C 007C6C 0020+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */
-static void useHeapInit(fopAc_ac_c* param_0) {
- // NONMATCHING
+ mWarpCylCollider.SetC(ato);
+ mWarpCylCollider.SetH(250.0f + BREG_F(14));
+ mWarpCylCollider.SetR(50.0f + BREG_F(15));
+ dComIfG_Ccsp()->Set(&mWarpCylCollider);
}
-/* ############################################################################################## */
-/* 80761798-8076179C 00029C 0004+00 0/1 0/0 0/0 .rodata @7430 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7430 = -4000.0f;
-COMPILER_STRIP_GATE(0x80761798, &lit_7430);
-#pragma pop
-
-/* 8076179C-807617A0 0002A0 0004+00 0/1 0/0 0/0 .rodata @7431 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7431 = 4000.0f;
-COMPILER_STRIP_GATE(0x8076179C, &lit_7431);
-#pragma pop
-
-/* 807617A0-807617A4 0002A4 0004+00 0/1 0/0 0/0 .rodata @7432 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7432 = -3.0f;
-COMPILER_STRIP_GATE(0x807617A0, &lit_7432);
-#pragma pop
-
-/* 807617A4-807617A8 0002A8 0004+00 0/1 0/0 0/0 .rodata @7433 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7433 = -400.0f;
-COMPILER_STRIP_GATE(0x807617A4, &lit_7433);
-#pragma pop
-
-/* 807617A8-807617AC 0002AC 0004+00 0/1 0/0 0/0 .rodata @7434 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7434 = -10000.0f;
-COMPILER_STRIP_GATE(0x807617A8, &lit_7434);
-#pragma pop
-
-/* 807617AC-807617B0 0002B0 0004+00 0/1 0/0 0/0 .rodata @7435 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7435 = 10000.0f;
-COMPILER_STRIP_GATE(0x807617AC, &lit_7435);
-#pragma pop
-
-/* 807617B0-807617B4 0002B4 0004+00 0/1 0/0 0/0 .rodata @7436 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7436 = 60.0f;
-COMPILER_STRIP_GATE(0x807617B0, &lit_7436);
-#pragma pop
-
-/* 8076010C-807607EC 007C8C 06E0+00 1/1 0/0 0/0 .text create__8daE_PZ_cFv */
-void daE_PZ_c::create() {
- // NONMATCHING
-}
-
-/* 807607EC-807609E0 00836C 01F4+00 1/1 0/0 0/0 .text __ct__8daE_PZ_cFv */
-daE_PZ_c::daE_PZ_c() {
- // NONMATCHING
-}
-
-/* 807609E0-80760A28 008560 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGSphFv */
-// cM3dGSph::~cM3dGSph() {
-extern "C" void __dt__8cM3dGSphFv() {
- // NONMATCHING
-}
-
-/* 80760A28-80760A70 0085A8 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGCylFv */
-// cM3dGCyl::~cM3dGCyl() {
-extern "C" void __dt__8cM3dGCylFv() {
- // NONMATCHING
-}
-
-/* 80760A70-80760AB8 0085F0 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGAabFv */
-// cM3dGAab::~cM3dGAab() {
-extern "C" void __dt__8cM3dGAabFv() {
- // NONMATCHING
-}
-
-/* 80760AB8-80760B14 008638 005C+00 1/0 0/0 0/0 .text __dt__10dCcD_GSttsFv */
-// dCcD_GStts::~dCcD_GStts() {
-extern "C" void __dt__10dCcD_GSttsFv() {
- // NONMATCHING
-}
-
-/* 80760B14-80760B84 008694 0070+00 3/2 0/0 0/0 .text __dt__12dBgS_ObjAcchFv */
-// dBgS_ObjAcch::~dBgS_ObjAcch() {
-extern "C" void __dt__12dBgS_ObjAcchFv() {
- // NONMATCHING
-}
-
-/* 80760B84-80760BF4 008704 0070+00 1/0 0/0 0/0 .text __dt__12dBgS_AcchCirFv */
-// dBgS_AcchCir::~dBgS_AcchCir() {
-extern "C" void __dt__12dBgS_AcchCirFv() {
- // NONMATCHING
-}
-
-/* 80760BF4-80760BF8 008774 0004+00 1/1 0/0 0/0 .text __ct__4cXyzFv */
-// cXyz::cXyz() {
-extern "C" void __ct__4cXyzFv() {
- /* empty function */
-}
-
-/* 80760BF8-80760C18 008778 0020+00 1/0 0/0 0/0 .text daE_PZ_Create__FP8daE_PZ_c */
-static void daE_PZ_Create(daE_PZ_c* param_0) {
- // NONMATCHING
-}
-
-/* 80760C18-80760C60 008798 0048+00 1/0 0/0 0/0 .text __dt__10cCcD_GSttsFv */
-// cCcD_GStts::~cCcD_GStts() {
-extern "C" void __dt__10cCcD_GSttsFv() {
- // NONMATCHING
-}
-
-/* 80760C60-80760CA8 0087E0 0048+00 2/1 0/0 0/0 .text __dt__12daE_PZ_HIO_cFv */
-daE_PZ_HIO_c::~daE_PZ_HIO_c() {
- // NONMATCHING
-}
-
-/* 80760CA8-80760CE4 008828 003C+00 0/0 1/0 0/0 .text __sinit_d_a_e_pz_cpp */
-void __sinit_d_a_e_pz_cpp() {
- // NONMATCHING
-}
+/* 8075F964-8075FA60 0074E4 00FC+00 1/1 0/0 0/0 .text execute__8daE_PZ_cFv */
+int daE_PZ_c::execute() {
+ if (arg0 == 10) {
+ return 1;
+ }
-#pragma push
-#pragma force_active on
-REGISTER_CTORS(0x80760CA8, __sinit_d_a_e_pz_cpp);
-#pragma pop
+ if (field_0x7d0 != 0) {
+ field_0x7d0--;
+ }
-/* 80760CE4-80760CEC 008864 0008+00 1/0 0/0 0/0 .text @36@__dt__12dBgS_ObjAcchFv */
-static void func_80760CE4() {
- // NONMATCHING
-}
+ if (field_0x7d1 != 0) {
+ field_0x7d1--;
+ }
-/* 80760CEC-80760CF4 00886C 0008+00 1/0 0/0 0/0 .text @20@__dt__12dBgS_ObjAcchFv */
-static void func_80760CEC() {
- // NONMATCHING
-}
+ if (field_0x7d2 != 0) {
+ field_0x7d2--;
+ }
-/* 80761108-80761144 008C88 003C+00 3/3 0/0 0/0 .text __dt__4cXyzFv */
-// cXyz::~cXyz() {
-extern "C" void __dt__4cXyzFv() {
- // NONMATCHING
-}
+ if (field_0x7d3 != 0) {
+ field_0x7d3--;
+ }
-/* 80761144-8076114C -00001 0008+00 0/0 0/0 0/0 .text changeDemoMoveAngle__9daPy_py_cFs
- */
-// void daPy_py_c::changeDemoMoveAngle(s16 param_0) {
-extern "C" void changeDemoMoveAngle__9daPy_py_cFs(fopAc_ac_c* param_0, u16 param_1) {
- *(u16*)(((u8*)param_0) + 1542) /* this->field_0x606 */ = param_1;
-}
+ if (arg0 != 20 && arg0 != 21 && arg0 != 30 && arg0 != 40) {
+ action();
+ } else {
+ action_fire();
+ fire_mtx_set();
+ return 1;
+ }
-/* 8076114C-80761164 008CCC 0018+00 1/1 0/0 0/0 .text zero__4cXyzFv */
-// void cXyz::zero() {
-extern "C" void zero__4cXyzFv() {
- // NONMATCHING
-}
+ if (attention_info.distances[fopAc_attn_BATTLE_e] == 0) {
+ return 1;
+ }
-/* 807611D8-80761208 008D58 0030+00 1/1 0/0 0/0 .text isStop__13mDoExt_morf_cFv */
-// void mDoExt_morf_c::isStop() {
-extern "C" void isStop__13mDoExt_morf_cFv() {
- // NONMATCHING
+ mtx_set();
+ cc_set();
+ return 1;
}
-/* 80761208-80761220 008D88 0018+00 1/1 0/0 0/0 .text checkNowWolf__9daPy_py_cFv */
-// void daPy_py_c::checkNowWolf() {
-extern "C" void checkNowWolf__9daPy_py_cFv() {
- // NONMATCHING
+/* 8075FA60-8075FA80 0075E0 0020+00 2/1 0/0 0/0 .text daE_PZ_Execute__FP8daE_PZ_c */
+static int daE_PZ_Execute(daE_PZ_c* i_this) {
+ return i_this->execute();
}
-/* 80761220-80761254 008DA0 0034+00 1/1 0/0 0/0 .text fopAcM_onSwitch__FPC10fopAc_ac_ci
- */
-// static void fopAcM_onSwitch(fopAc_ac_c const* param_0, int param_1) {
-extern "C" void fopAcM_onSwitch__FPC10fopAc_ac_ci() {
- // NONMATCHING
+/* 8075FA80-8075FA88 007600 0008+00 1/0 0/0 0/0 .text daE_PZ_IsDelete__FP8daE_PZ_c */
+static int daE_PZ_IsDelete(daE_PZ_c* i_this) {
+ return 1;
}
-/* 80761254-80761368 008DD4 0114+00 1/1 0/0 0/0 .text abs__4cXyzCFv */
-// void cXyz::abs() const {
-extern "C" void abs__4cXyzCFv() {
- // NONMATCHING
-}
+/* 8075FA88-8075FB2C 007608 00A4+00 1/1 0/0 0/0 .text _delete__8daE_PZ_cFv */
+int daE_PZ_c::_delete() {
+ dComIfG_resDelete(&mPhase, "E_PZ");
+ if (arg0 == 10) {
+ return 1;
+ }
-/* 80761368-80761384 008EE8 001C+00 1/1 0/0 0/0 .text changeDemoPos0__9daPy_py_cFPC4cXyz
- */
-// void daPy_py_c::changeDemoPos0(cXyz const* param_0) {
-extern "C" void changeDemoPos0__9daPy_py_cFPC4cXyz() {
- // NONMATCHING
-}
+ if (mInitHIO != 0) {
+ l_initHIO = 0;
+ mDoHIO_DELETE_CHILD(l_HIO.no);
+ }
-/* 80761384-807613B0 008F04 002C+00 1/1 0/0 0/0 .text fopAcM_searchPlayerAngleY__FPC10fopAc_ac_c
- */
-// static void fopAcM_searchPlayerAngleY(fopAc_ac_c const* param_0) {
-extern "C" void fopAcM_searchPlayerAngleY__FPC10fopAc_ac_c() {
- // NONMATCHING
-}
-
-/* 807613B0-807613F0 008F30 0040+00 1/1 0/0 0/0 .text setFrame__13mDoExt_morf_cFf */
-// void mDoExt_morf_c::setFrame(f32 param_0) {
-extern "C" void setFrame__13mDoExt_morf_cFf() {
- // NONMATCHING
-}
+ if (arg0 == 30 || arg0 == 40) {
+ return 1;
+ }
-/* 807613F0-8076140C 008F70 001C+00 1/1 0/0 0/0 .text set__4cXyzFRC3Vec */
-// void cXyz::set(Vec const& param_0) {
-extern "C" void set__4cXyzFRC3Vec() {
- // NONMATCHING
-}
+ if (heap != NULL) {
+ field_0x5dc.deleteObject();
+ }
-/* 8076140C-8076141C 008F8C 0010+00 1/1 0/0 0/0 .text set__4cXyzFfff */
-// void cXyz::set(f32 param_0, f32 param_1, f32 param_2) {
-extern "C" void set__4cXyzFfff() {
- // NONMATCHING
+ return 1;
}
-/* 8076141C-80761430 008F9C 0014+00 1/1 0/0 0/0 .text changeDemoMode__9daPy_py_cFUliis */
-// void daPy_py_c::changeDemoMode(u32 param_0, int param_1, int param_2, s16 param_3) {
-extern "C" void changeDemoMode__9daPy_py_cFUliis() {
- // NONMATCHING
+/* 8075FB2C-8075FB4C 0076AC 0020+00 1/0 0/0 0/0 .text daE_PZ_Delete__FP8daE_PZ_c */
+static int daE_PZ_Delete(daE_PZ_c* i_this) {
+ return i_this->_delete();
}
-/* 80761430-80761444 008FB0 0014+00 1/1 0/0 0/0 .text changeOriginalDemo__9daPy_py_cFv */
-// void daPy_py_c::changeOriginalDemo() {
-extern "C" void changeOriginalDemo__9daPy_py_cFv() {
- // NONMATCHING
+/* 8075FB4C-807600A4 0076CC 0558+00 1/1 0/0 0/0 .text CreateHeap__8daE_PZ_cFv */
+int daE_PZ_c::CreateHeap() {
+ if (arg0 >= 20 && arg0 <= 23) {
+ J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes("E_PZ", 0x18);
+ JUT_ASSERT(3876, modelData != 0);
+ mpPortalModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000284);
+ if (mpPortalModel == NULL) {
+ return 0;
+ }
+
+ mpPortalBtk = new mDoExt_btkAnm();
+ if (mpPortalBtk == NULL) {
+ return 0;
+ }
+
+ if (!mpPortalBtk->init(mpPortalModel->getModelData(), (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("E_PZ", 0x25), 1, 2, 1.0f, 0, -1)) {
+ return 0;
+ }
+
+ for (int i = 0; i < 2; i++) {
+ mpPortalBrk[i] = new mDoExt_brkAnm();
+ if (mpPortalBrk[i] == NULL) {
+ return 0;
+ }
+
+ static int mPzDarkHoll_dt[] = {0x1F, 0x20};
+ if (!mpPortalBrk[i]->init(mpPortalModel->getModelData(), (J3DAnmTevRegKey*)dComIfG_getObjectRes("E_PZ", mPzDarkHoll_dt[i]), 1, 0, 1.0f, 0, -1)) {
+ return 0;
+ }
+ }
+
+ modelData = (J3DModelData*)dComIfG_getObjectRes("E_PZ", 0x19);
+ JUT_ASSERT(3920, modelData != 0);
+ mpBallModelMorf = new mDoExt_McaMorfSO(modelData, NULL, NULL, (J3DAnmTransform*)dComIfG_getObjectRes("E_PZ", 7), 2, 1.0f, 0, -1, NULL, 0, 0x11000084);
+ if (mpBallModelMorf == NULL) {
+ return 0;
+ }
+
+ for (int i = 0; i < 2; i++) {
+ mpBallBrk = new mDoExt_brkAnm();
+ if (mpBallBrk == NULL) {
+ return 0;
+ }
+
+ if (!mpBallBrk->init(mpBallModelMorf->getModel()->getModelData(), (J3DAnmTevRegKey*)dComIfG_getObjectRes("E_PZ", 0x21), 1, 0, 1.0f, 0, -1)) {
+ return 0;
+ }
+ }
+
+ return 1;
+ }
+
+ J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes("E_PZ", 0x1C);
+ JUT_ASSERT(3959, modelData != 0);
+ mpModelMorf = new mDoExt_McaMorfSO(modelData, NULL, NULL, (J3DAnmTransform*)dComIfG_getObjectRes("E_PZ", 8), 2, 1.0f, 0, -1, &field_0x5dc, 0, 0x11000284);
+ if (mpModelMorf == NULL || mpModelMorf->getModel() == NULL) {
+ return 0;
+ }
+
+ mpPzBrk = new mDoExt_brkAnm();
+ if (mpPzBrk == NULL) {
+ return 0;
+ }
+
+ if (!mpPzBrk->init(mpModelMorf->getModel()->getModelData(), (J3DAnmTevRegKey*)dComIfG_getObjectRes("E_PZ", 0x22), 1, 2, 1.0f, 0, -1)) {
+ return 0;
+ }
+
+ mpPzBtk = new mDoExt_btkAnm();
+ if (mpPzBtk == NULL) {
+ return 0;
+ }
+
+ if (!mpPzBtk->init(mpModelMorf->getModel()->getModelData(), (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("E_PZ", 0x26), 1, 2, 1.0f, 0, -1)) {
+ return 0;
+ }
+
+ return 1;
}
-/* 80761454-80761470 008FD4 001C+00 1/1 0/0 0/0 .text __as__4cXyzFRC4cXyz */
-// void cXyz::operator=(cXyz const& param_0) {
-extern "C" void __as__4cXyzFRC4cXyz() {
- // NONMATCHING
+/* 807600EC-8076010C 007C6C 0020+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */
+static int useHeapInit(fopAc_ac_c* i_this) {
+ return ((daE_PZ_c*)i_this)->CreateHeap();
}
-/* 80761470-80761488 008FF0 0018+00 1/1 0/0 0/0 .text dComIfGp_getPlayer__Fi */
-// static void dComIfGp_getPlayer(int param_0) {
-extern "C" void dComIfGp_getPlayer__Fi() {
- // NONMATCHING
+/* 8076010C-807607EC 007C8C 06E0+00 1/1 0/0 0/0 .text create__8daE_PZ_cFv */
+int daE_PZ_c::create() {
+ fopAcM_SetupActor(this, daE_PZ_c);
+
+ int phase_state = dComIfG_resLoad(&mPhase, "E_PZ");
+ if (phase_state == cPhs_COMPLEATE_e) {
+ OS_REPORT("E_PZ PARAM %x\n", fopAcM_GetParam(this));
+
+ arg0 = fopAcM_GetParam(this);
+ arg1 = (fopAcM_GetParam(this) & 0xFF00) >> 8;
+ bitSw = (fopAcM_GetParam(this) & 0xFF0000) >> 0x10;
+
+ if (arg0 == 0xFF) {
+ arg0 = 0;
+ }
+
+ if (BREG_S(0) != 0) {
+ arg0 = BREG_S(0) - 1;
+ }
+
+ if (arg0 != 0 && arg0 != 1) {
+ bitSw = 0xFF;
+ }
+
+ OS_REPORT("arg0 %d\n", arg0);
+ OS_REPORT("arg1 %d\n", arg1);
+ OS_REPORT("bitSw %d\n\n", bitSw);
+
+ field_0x7cc = 3.0f * l_HIO.body_model_size;
+
+ if (arg0 == 10) {
+ mEntrySUB(false);
+ fopAcM_SetGroup(this, 0);
+
+ OS_REPORT("current.pos.x %f\n", current.pos.x);
+ OS_REPORT("current.pos.z %f\n\n", current.pos.z);
+
+ fopAcM_SetMin(this, -4000.0f, -4000.0f, -4000.0f);
+ fopAcM_SetMax(this, 4000.0f, 4000.0f, 4000.0f);
+ } else {
+ if ((arg0 == 0 || arg0 == 1) && bitSw != 0xFF && fopAcM_isSwitch( this, bitSw)) {
+ cXyz pos(0.0f, 0.0f, -1300.0f);
+ fopAcM_create(PROC_KYTAG12, 1, &pos, fopAcM_GetRoomNo(this), NULL, NULL, -1);
+ return cPhs_ERROR_e;
+ }
+
+ if (arg0 != 40 && arg0 != 30) {
+ u32 heap_size = 0x3FF0;
+ if (arg0 >= 20 && arg0 <= 23) {
+ heap_size = 0x2920;
+ }
+
+ if (!fopAcM_entrySolidHeap(this, useHeapInit, heap_size)) {
+ return cPhs_ERROR_e;
+ }
+ }
+
+ if (!l_initHIO) {
+ l_initHIO = true;
+ mInitHIO = true;
+ l_HIO.no = mDoHIO_CREATE_CHILD("ファントムザント", &l_HIO);
+ }
+
+ attention_info.flags = 4;
+
+ mColliderStts.Init(0xFE, 0, this);
+
+ if ((arg0 < 20 || arg0 > 23) && arg0 != 30 && arg0 != 40) {
+ fopAcM_SetMtx(this, mpModelMorf->getModel()->getBaseTRMtx());
+
+ mCylCollider.Set(cc_pz_src);
+ mCylCollider.SetStts(&mColliderStts);
+
+ mWarpCylCollider.Set(cc_pz_wp_src);
+ mWarpCylCollider.SetStts(&mColliderStts);
+
+ field_0x5dc.init(&current.pos, &eyePos, 3, 1);
+ mAtInfo.mpSound = &field_0x5dc;
+ mAtInfo.mPowerType = 12;
+
+ gravity = -3.0f;
+ mEntrySUB(false);
+ fopAcM_SetMin(this, -400.0f, -400.0f, -400.0f);
+ fopAcM_SetMax(this, 400.0f, 400.0f, 400.0f);
+ } else {
+ mEntrySUB(false);
+ fopAcM_SetGroup(this, 0);
+ fopAcM_SetMin(this, -10000.0f, -10000.0f, -10000.0f);
+ fopAcM_SetMax(this, 10000.0f, 10000.0f, 10000.0f);
+ }
+
+ mAcch.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, &mAcchCir, fopAcM_GetSpeed_p(this), NULL, NULL);
+ mAcchCir.SetWall(10.0f, 60.0f);
+
+ health = 540;
+ field_0x560 = 540;
+
+ field_0x7bc = 40.0f;
+ if (BREG_S(4) != 0) {
+ health = 2;
+ }
+
+ mPzScale.set(0.0f, field_0x7cc, 0.0f);
+ shape_angle.x = shape_angle.z = 0;
+
+ if ((arg0 < 20 || arg0 > 23) && arg0 != 30 && arg0 != 40) {
+ field_0x7d3 = 3;
+
+ if (arg0 == 0) {
+ if (fopAcM_isSwitch(this, 28)) {
+ cDmr_SkipInfo = 0;
+ fopAcM_onSwitch(this, 27);
+ fopAcM_offSwitch(this, 28);
+ }
+ } else if (fopAcM_isSwitch(this, 25)) {
+ cDmr_SkipInfo = 0;
+ fopAcM_offSwitch(this, 25);
+ fopAcM_offSwitch(this, 26);
+ }
+
+ if (BREG_S(9) != 0 || cDmr_SkipInfo != 0) {
+ if (arg0 == 0) {
+ fopAcM_onSwitch(this, 25);
+ fopAcM_onSwitch(this, 26);
+ } else {
+ fopAcM_onSwitch(this, 27);
+ fopAcM_onSwitch(this, 28);
+ }
+
+ cDmr_SkipInfo = 0;
+ setActionMode(ACTION_SEARCH_POINT_e, 0);
+ } else {
+ mCylCollider.OffTgSetBit();
+ mCylCollider.OffCoSetBit();
+
+ attention_info.distances[fopAc_attn_BATTLE_e] = 0;
+ fopAcM_OffStatus(this, 0);
+ attention_info.flags &= ~4;
+
+ if (arg0 == 0) {
+ field_0x7bc = 20.0f;
+ fopAcM_offSwitch(this, 25);
+ fopAcM_offSwitch(this, 26);
+ setActionMode(ACTION_OPENING_DEMO_e, 0);
+ } else {
+ fopAcM_onSwitch(this, 27);
+ fopAcM_offSwitch(this, 28);
+ gravity = 0.0f;
+ setActionMode(ACTION_OPENING_DEMO_e, 100);
+ }
+ }
+ } else if (arg0 != 30 && arg0 != 40) {
+ if (arg0 == 22 || arg0 == 23) {
+ arg0 -= 2;
+ fopAcM_OnStatus(this, 0x4000);
+ }
+ field_0x7c8 = 1.0f;
+ setActionMode(6, 0);
+ } else if (arg0 == 30) {
+ field_0x7c8 = 1.0f;
+ setActionMode(6, 10);
+ } else {
+ mBulletAtCollider.Set(cc_pz_at_src);
+ mBulletAtCollider.SetStts(&mColliderStts);
+ mAcchCir.SetWall(20.0f, 20.0f);
+
+ field_0x7c8 = field_0x7cc;
+ setActionMode(7, 0);
+ }
+ }
+
+ daE_PZ_Execute(this);
+ }
+
+ return phase_state;
}
-/* 807614BC-807614D8 00903C 001C+00 1/1 0/0 0/0 .text __ct__4cXyzFRC4cXyz */
-// cXyz::cXyz(cXyz const& param_0) {
-extern "C" void __ct__4cXyzFRC4cXyz() {
- // NONMATCHING
-}
+/* 807607EC-807609E0 00836C 01F4+00 1/1 0/0 0/0 .text __ct__8daE_PZ_cFv */
+daE_PZ_c::daE_PZ_c() {}
-/* 807614D8-807614E8 009058 0010+00 1/1 0/0 0/0 .text __ct__4cXyzFfff */
-// cXyz::cXyz(f32 param_0, f32 param_1, f32 param_2) {
-extern "C" void __ct__4cXyzFfff() {
- // NONMATCHING
+/* 80760BF8-80760C18 008778 0020+00 1/0 0/0 0/0 .text daE_PZ_Create__FP8daE_PZ_c */
+static int daE_PZ_Create(daE_PZ_c* i_this) {
+ return i_this->create();
}
-/* ############################################################################################## */
-/* 8076222C-80762230 000474 0004+00 0/0 0/0 0/0 .bss
- * sInstance__40JASGlobalInstance<19JASDefaultBankTable> */
-#pragma push
-#pragma force_active on
-static u8 data_8076222C[4];
-#pragma pop
-
-/* 80762230-80762234 000478 0004+00 0/0 0/0 0/0 .bss
- * sInstance__35JASGlobalInstance<14JASAudioThread> */
-#pragma push
-#pragma force_active on
-static u8 data_80762230[4];
-#pragma pop
-
-/* 80762234-80762238 00047C 0004+00 0/0 0/0 0/0 .bss sInstance__27JASGlobalInstance<7Z2SeMgr> */
-#pragma push
-#pragma force_active on
-static u8 data_80762234[4];
-#pragma pop
-
-/* 80762238-8076223C 000480 0004+00 0/0 0/0 0/0 .bss sInstance__28JASGlobalInstance<8Z2SeqMgr> */
-#pragma push
-#pragma force_active on
-static u8 data_80762238[4];
-#pragma pop
-
-/* 8076223C-80762240 000484 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2SceneMgr>
- */
-#pragma push
-#pragma force_active on
-static u8 data_8076223C[4];
-#pragma pop
-
-/* 80762240-80762244 000488 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2StatusMgr>
- */
-#pragma push
-#pragma force_active on
-static u8 data_80762240[4];
-#pragma pop
-
-/* 80762244-80762248 00048C 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2DebugSys>
- */
-#pragma push
-#pragma force_active on
-static u8 data_80762244[4];
-#pragma pop
-
-/* 80762248-8076224C 000490 0004+00 0/0 0/0 0/0 .bss
- * sInstance__36JASGlobalInstance<15JAISoundStarter> */
-#pragma push
-#pragma force_active on
-static u8 data_80762248[4];
-#pragma pop
-
-/* 8076224C-80762250 000494 0004+00 0/0 0/0 0/0 .bss
- * sInstance__35JASGlobalInstance<14Z2SoundStarter> */
-#pragma push
-#pragma force_active on
-static u8 data_8076224C[4];
-#pragma pop
-
-/* 80762250-80762254 000498 0004+00 0/0 0/0 0/0 .bss
- * sInstance__33JASGlobalInstance<12Z2SpeechMgr2> */
-#pragma push
-#pragma force_active on
-static u8 data_80762250[4];
-#pragma pop
-
-/* 80762254-80762258 00049C 0004+00 0/0 0/0 0/0 .bss sInstance__28JASGlobalInstance<8JAISeMgr> */
-#pragma push
-#pragma force_active on
-static u8 data_80762254[4];
-#pragma pop
-
-/* 80762258-8076225C 0004A0 0004+00 0/0 0/0 0/0 .bss sInstance__29JASGlobalInstance<9JAISeqMgr> */
-#pragma push
-#pragma force_active on
-static u8 data_80762258[4];
-#pragma pop
-
-/* 8076225C-80762260 0004A4 0004+00 0/0 0/0 0/0 .bss
- * sInstance__33JASGlobalInstance<12JAIStreamMgr> */
-#pragma push
-#pragma force_active on
-static u8 data_8076225C[4];
-#pragma pop
-
-/* 80762260-80762264 0004A8 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2SoundMgr>
- */
-#pragma push
-#pragma force_active on
-static u8 data_80762260[4];
-#pragma pop
-
-/* 80762264-80762268 0004AC 0004+00 0/0 0/0 0/0 .bss
- * sInstance__33JASGlobalInstance<12JAISoundInfo> */
-#pragma push
-#pragma force_active on
-static u8 data_80762264[4];
-#pragma pop
-
-/* 80762268-8076226C 0004B0 0004+00 0/0 0/0 0/0 .bss
- * sInstance__34JASGlobalInstance<13JAUSoundTable> */
-#pragma push
-#pragma force_active on
-static u8 data_80762268[4];
-#pragma pop
-
-/* 8076226C-80762270 0004B4 0004+00 0/0 0/0 0/0 .bss
- * sInstance__38JASGlobalInstance<17JAUSoundNameTable> */
-#pragma push
-#pragma force_active on
-static u8 data_8076226C[4];
-#pragma pop
-
-/* 80762270-80762274 0004B8 0004+00 0/0 0/0 0/0 .bss
- * sInstance__33JASGlobalInstance<12JAUSoundInfo> */
-#pragma push
-#pragma force_active on
-static u8 data_80762270[4];
-#pragma pop
-
-/* 80762274-80762278 0004BC 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2SoundInfo>
- */
-#pragma push
-#pragma force_active on
-static u8 data_80762274[4];
-#pragma pop
-
-/* 80762278-8076227C 0004C0 0004+00 0/0 0/0 0/0 .bss
- * sInstance__34JASGlobalInstance<13Z2SoundObjMgr> */
-#pragma push
-#pragma force_active on
-static u8 data_80762278[4];
-#pragma pop
-
-/* 8076227C-80762280 0004C4 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2Audience>
- */
-#pragma push
-#pragma force_active on
-static u8 data_8076227C[4];
-#pragma pop
-
-/* 80762280-80762284 0004C8 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2FxLineMgr>
- */
-#pragma push
-#pragma force_active on
-static u8 data_80762280[4];
-#pragma pop
+/* 80761CE0-80761D00 -00001 0020+00 1/0 0/0 0/0 .data l_daE_PZ_Method */
+static actor_method_class l_daE_PZ_Method = {
+ (process_method_func)daE_PZ_Create,
+ (process_method_func)daE_PZ_Delete,
+ (process_method_func)daE_PZ_Execute,
+ (process_method_func)daE_PZ_IsDelete,
+ (process_method_func)daE_PZ_Draw,
+};
-/* 80762284-80762288 0004CC 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2EnvSeMgr>
- */
-#pragma push
-#pragma force_active on
-static u8 data_80762284[4];
-#pragma pop
+/* 80761D00-80761D30 -00001 0030+00 0/0 0/0 1/0 .data g_profile_E_PZ */
+extern actor_process_profile_definition g_profile_E_PZ = {
+ fpcLy_CURRENT_e, // mLayerID
+ 7, // mListID
+ fpcPi_CURRENT_e, // mListPrio
+ PROC_E_PZ, // mProcName
+ &g_fpcLf_Method.base, // sub_method
+ sizeof(daE_PZ_c), // mSize
+ 0, // mSizeOther
+ 0, // mParameters
+ &g_fopAc_Method.base, // sub_method
+ 175, // mPriority
+ &l_daE_PZ_Method, // sub_method
+ 0x00040100, // mStatus
+ fopAc_ENEMY_e, // mActorType
+ fopAc_CULLBOX_CUSTOM_e, // cullType
+};
-/* 80762288-8076228C 0004D0 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2SpeechMgr>
- */
-#pragma push
-#pragma force_active on
-static u8 data_80762288[4];
-#pragma pop
-
-/* 8076228C-80762290 0004D4 0004+00 0/0 0/0 0/0 .bss
- * sInstance__34JASGlobalInstance<13Z2WolfHowlMgr> */
-#pragma push
-#pragma force_active on
-static u8 data_8076228C[4];
-#pragma pop
-
-/* 807617B4-807617B4 0002B8 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
+AUDIO_INSTANCES;
diff --git a/src/f_pc/f_pc_base.cpp b/src/f_pc/f_pc_base.cpp
index 68fba36923..c94a072977 100644
--- a/src/f_pc/f_pc_base.cpp
+++ b/src/f_pc/f_pc_base.cpp
@@ -11,10 +11,19 @@
#include "f_pc/f_pc_method.h"
#include "f_pc/f_pc_pause.h"
#include "f_pc/f_pc_profile.h"
+#include "f_pc/f_pc_debug_sv.h"
+
+#if VERSION == VERSION_SHIELD_DEBUG
+#include "Z2AudioLib/Z2AudioMgr.h"
+#endif
/* 8002064C-8002065C 0010+00 s=0 e=14 z=0 None .text fpcBs_Is_JustOfType__Fii */
BOOL fpcBs_Is_JustOfType(int i_typeA, int i_typeB) {
- return i_typeB == i_typeA ? TRUE : FALSE;
+ if (i_typeB == i_typeA) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
}
/* 80450D00-80450D04 0004+00 s=1 e=0 z=0 None .sbss g_fpcBs_type */
@@ -37,13 +46,27 @@ int fpcBs_MakeOfId() {
/* 800206C4-80020720 005C+00 s=0 e=1 z=0 None .text fpcBs_Execute__FP18base_process_class */
int fpcBs_Execute(base_process_class* i_proc) {
- int result;
- layer_class* save_layer = fpcLy_CurrentLayer();
+ int result = 1;
+
+#ifdef DEBUG
+ if (!fpcBs_Is_JustOfType(g_fpcBs_type, i_proc->type)) {
+ if (g_fpcDbSv_service[10] != NULL) {
+ g_fpcDbSv_service[10](i_proc);
+ }
+
+ return 0;
+ }
+#endif
- fpcLy_SetCurrentLayer(i_proc->layer_tag.layer);
- result = fpcMtd_Execute(i_proc->methods, i_proc);
+ if (result == 1) {
+ layer_class* save_layer = fpcLy_CurrentLayer();
- fpcLy_SetCurrentLayer(save_layer);
+ fpcLy_SetCurrentLayer(i_proc->layer_tag.layer);
+ result = fpcMtd_Execute(i_proc->methods, i_proc);
+
+ fpcLy_SetCurrentLayer(save_layer);
+ }
+
return result;
}
diff --git a/src/f_pc/f_pc_create_req.cpp b/src/f_pc/f_pc_create_req.cpp
index f434511f3e..d2b5e8f45f 100644
--- a/src/f_pc/f_pc_create_req.cpp
+++ b/src/f_pc/f_pc_create_req.cpp
@@ -10,17 +10,26 @@
#include "f_pc/f_pc_deletor.h"
#include "f_pc/f_pc_executor.h"
#include "f_pc/f_pc_layer.h"
+#include "f_pc/f_pc_debug_sv.h"
/* 80020ACC-80020AE8 001C+00 s=1 e=0 z=0 None .text fpcCtRq_isCreatingByID__FP10create_tagPUi
*/
-bool fpcCtRq_isCreatingByID(create_tag* i_createTag, fpc_ProcID* i_id) {
+BOOL fpcCtRq_isCreatingByID(create_tag* i_createTag, fpc_ProcID* i_id) {
create_request* req = (create_request*)i_createTag->base.mpTagData;
- return req->id == *i_id;
+ if (req->id == *i_id) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
}
/* 80020AE8-80020B20 0038+00 s=0 e=2 z=0 None .text fpcCtRq_IsCreatingByID__FUi */
BOOL fpcCtRq_IsCreatingByID(fpc_ProcID i_id) {
- return fpcCtIt_Judge((fpcLyIt_JudgeFunc)fpcCtRq_isCreatingByID, &i_id) != NULL ? TRUE : FALSE;
+ if (fpcCtIt_Judge((fpcLyIt_JudgeFunc)fpcCtRq_isCreatingByID, &i_id) != NULL) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
}
/* 80020B20-80020B5C 003C+00 s=1 e=0 z=0 None .text fpcCtRq_CreateQTo__FP14create_request */
@@ -54,12 +63,10 @@ BOOL fpcCtRq_Delete(create_request* i_request) {
/* 80020C14-80020CAC 0098+00 s=2 e=2 z=0 None .text fpcCtRq_Cancel__FP14create_request */
BOOL fpcCtRq_Cancel(create_request* i_request) {
- base_process_class* pproc;
if (i_request != NULL && !i_request->is_cancel) {
i_request->is_cancel = TRUE;
- pproc = i_request->process;
- if (pproc != NULL && !fpcDt_Delete(pproc))
+ if (i_request->process != NULL && !fpcDt_Delete(i_request->process))
return FALSE;
if (i_request->methods != NULL && !fpcMtd_Method(i_request->methods->cancel_method, i_request))
@@ -84,8 +91,9 @@ BOOL fpcCtRq_Do(create_request* i_request) {
int phase = cPhs_COMPLEATE_e;
if (i_request->methods != NULL) {
- cPhs__Handler pHandler = i_request->methods->phase_handler;
- if (pHandler != NULL) {
+ if (i_request->methods->phase_handler != NULL) {
+ cPhs__Handler pHandler = i_request->methods->phase_handler;
+
i_request->is_doing = TRUE;
phase = pHandler(i_request);
i_request->is_doing = FALSE;
@@ -94,14 +102,18 @@ BOOL fpcCtRq_Do(create_request* i_request) {
switch (phase) {
case cPhs_COMPLEATE_e: {
- int success = fpcEx_ToExecuteQ(i_request->process);
- if (success == 0)
+ if (fpcEx_ToExecuteQ(i_request->process) == 0)
return fpcCtRq_Cancel(i_request);
else
return fpcCtRq_Delete(i_request);
}
case cPhs_UNK3_e:
case cPhs_ERROR_e:
+#ifdef DEBUG
+ if (g_fpcDbSv_service[2] != NULL) {
+ g_fpcDbSv_service[2](i_request->process);
+ }
+#endif
return fpcCtRq_Cancel(i_request);
}
@@ -109,8 +121,13 @@ BOOL fpcCtRq_Do(create_request* i_request) {
}
/* 80020D84-80020DB0 002C+00 s=0 e=1 z=0 None .text fpcCtRq_Handler__Fv */
-void fpcCtRq_Handler() {
- fpcCtIt_Method((fpcCtIt_MethodFunc)fpcCtRq_Do, NULL);
+int fpcCtRq_Handler() {
+#ifdef DEBUG
+ if (g_fpcDbSv_service[3] != NULL) {
+ g_fpcDbSv_service[3](&g_fpcCtTg_Queue.mSize);
+ }
+#endif
+ return fpcCtIt_Method((fpcCtIt_MethodFunc)fpcCtRq_Do, NULL);
}
/* 80020DB0-80020E38 0088+00 s=0 e=2 z=0 None .text
@@ -119,7 +136,8 @@ create_request* fpcCtRq_Create(layer_class* i_layer, u32 i_size, create_request_
create_request* req = (create_request*)cMl::memalignB(-4, i_size);
if (req != NULL) {
- fpcCtTg_Init(&req->base, req);
+ create_tag* tag = &req->base;
+ fpcCtTg_Init(tag, req);
fpcMtdTg_Init(&req->method_tag, (process_method_tag_func)fpcCtRq_Cancel, req);
req->layer = i_layer;
req->methods = i_methods;
diff --git a/src/f_pc/f_pc_creator.cpp b/src/f_pc/f_pc_creator.cpp
index c8508d3bd8..1aadd9aff1 100644
--- a/src/f_pc/f_pc_creator.cpp
+++ b/src/f_pc/f_pc_creator.cpp
@@ -23,6 +23,6 @@ BOOL fpcCt_Abort(base_process_class* i_proc) {
}
/* 80020F10-80020F30 0020+00 s=0 e=1 z=0 None .text fpcCt_Handler__Fv */
-void fpcCt_Handler() {
- fpcCtRq_Handler();
+int fpcCt_Handler() {
+ return fpcCtRq_Handler();
}
diff --git a/src/f_pc/f_pc_debug_sv.cpp b/src/f_pc/f_pc_debug_sv.cpp
new file mode 100644
index 0000000000..94250ad66e
--- /dev/null
+++ b/src/f_pc/f_pc_debug_sv.cpp
@@ -0,0 +1,858 @@
+#ifdef DEBUG
+
+#include "f_pc/f_pc_base.h"
+#include "f_pc/f_pc_debug_sv.h"
+
+int fpcBs_pc_c__print(base_process_class* i_process) {
+ return 0;
+}
+
+void fpcBs_pc_c__fpcDbSv_callbackXX(void* i_process, char* arg1) {
+ arg1;
+ fpcBs_pc_c__print((base_process_class*)i_process);
+}
+
+void fpcBs_pc_c__fpcDbSv_callback00(void* i_process) {
+ // "Waiting for creation"
+ fpcBs_pc_c__fpcDbSv_callbackXX((base_process_class*)i_process, "生成待ち");
+}
+
+void fpcBs_pc_c__fpcDbSv_callback02(void* i_process) {
+ // "Creation error"
+ fpcBs_pc_c__fpcDbSv_callbackXX((base_process_class*)i_process, "生成エラー");
+}
+
+void fpcBs_pc_c__fpcDbSv_callback10(void* i_process) {
+ // "Deletion Retry"
+ fpcBs_pc_c__fpcDbSv_callbackXX((base_process_class*)i_process, "削除のリトライ");
+}
+
+void fpcBs_pc_c__fpcDbSv_callback11(void* i_process) {
+ // "Deletion Denied"
+ fpcBs_pc_c__fpcDbSv_callbackXX((base_process_class*)i_process, "削除の拒否");
+}
+
+void fpcBs_pc_c__fpcDbSv_callback20(void* i_process) {
+ // "Waiting for old Scene deletion"
+ fpcBs_pc_c__fpcDbSv_callbackXX((base_process_class*)i_process, "旧シーン削除待");
+}
+
+void fpcBs_pc_c__fpcDbSv_callback21(void* i_process) {
+ // "Waiting for Scene creation"
+ fpcBs_pc_c__fpcDbSv_callbackXX((base_process_class*)i_process, "シーン生成待ち");
+}
+
+const fpcDbSv_callback g_fpcDbSv_service[50] = {
+ fpcBs_pc_c__fpcDbSv_callback00,
+ NULL,
+ fpcBs_pc_c__fpcDbSv_callback02,
+ NULL,
+ fpcBs_pc_c__fpcDbSv_callback10,
+ fpcBs_pc_c__fpcDbSv_callback11,
+ NULL,
+ fpcBs_pc_c__fpcDbSv_callback20,
+ fpcBs_pc_c__fpcDbSv_callback21,
+};
+
+char* fpcDbSv_getNameString(s16 i_name) {
+ static char* namelist[] = {
+ "OVERLAP0",
+ "OVERLAP1",
+ "OVERLAP3",
+ "OVERLAP6",
+ "OVERLAP7",
+ "OVERLAP8",
+ "OVERLAP9",
+ "OVERLAP10",
+ "OVERLAP11",
+ "LOGO_SCENE",
+ "MENU_SCENE",
+ "PLAY_SCENE",
+ "OPENING_SCENE",
+ "NAME_SCENE",
+ "NAMEEX_SCENE",
+ "WARNING_SCENE",
+ "WARNING2_SCENE",
+ "OVERLAP2",
+ "ROOM_SCENE",
+ "KANKYO",
+ "ALLDIE",
+ "ENVSE",
+ "Obj_Swpush",
+ "Obj_Swpush2",
+ "Obj_Swpush5",
+ "Tag_Gstart",
+ "NO_CHG_ROOM",
+ "Obj_Lv6ElevtA",
+ "OBJ_SO",
+ "Obj_Movebox",
+ "Obj_SwTurn",
+ "Obj_Lv6SwTurn",
+ "OBJ_SEKIZOA",
+ "OBJ_GRA",
+ "TAG_GRA",
+ "TAG_YAMI",
+ "Obj_Ladder",
+ "OBJ_BEF",
+ "OBJ_FMOBJ",
+ "OBJ_LBOX",
+ "OBJ_WEB0",
+ "OBJ_WEB1",
+ "OBJ_CB",
+ "OBJ_MAKI",
+ "OBJ_BRG",
+ "OBJ_GB",
+ "OBJ_GM",
+ "OBJ_TOBY",
+ "OBJ_TP",
+ "TREESH",
+ "Obj_ZDoor",
+ "Obj_Pillar",
+ "Obj_Cdoor",
+ "GRDWATER",
+ "Obj_RotBridge",
+ "Obj_MagLift",
+ "Obj_MagLiftRot",
+ "Obj_Lv1Cdl00",
+ "Obj_Lv1Cdl01",
+ "Obj_TvCdlst",
+ "Obj_HsTarget",
+ "Obj_HeavySw",
+ "Obj_GoGate",
+ "Obj_TaFence",
+ "Obj_Saidan",
+ "Obj_SpinLift",
+ "Obj_BmWindow",
+ "Obj_RfHole",
+ "Obj_WaterPillar",
+ "Obj_SyRock",
+ "Obj_BsGate",
+ "Obj_AmiShutter",
+ "Obj_WtGate",
+ "Obj_Lv2Candle",
+ "Obj_TogeTrap",
+ "Obj_RotTrap",
+ "Obj_SwallShutter",
+ "Obj_IceWall",
+ "Obj_Lv5SwIce",
+ "Obj_Lv5FBoard",
+ "Obj_Turara",
+ "Obj_TwGate",
+ "Obj_Digholl",
+ "Obj_Digpl",
+ "Obj_TestCube",
+ "Obj_Kshutter",
+ "NPC_COACH",
+ "NPC_THEB",
+ "COACH_FIRE",
+ "COACH2D",
+ "BALLOON2D",
+ "SKIP2D",
+ "Obj_MvStair",
+ "Obj_Cowdoor",
+ "Obj_Swpropeller",
+ "Obj_BoomShutter",
+ "NPC_KS",
+ "Obj_Hfuta",
+ "Obj_BkDoor",
+ "Obj_Cboard",
+ "Obj_MGate",
+ "Obj_Ikada",
+ "Obj_Ice_l",
+ "Obj_Ice_s",
+ "Obj_E_CREATE",
+ "Obj_Bhbridge",
+ "Obj_Kaisou",
+ "Obj_HHASHI",
+ "Obj_BHASHI",
+ "OCTHASHI",
+ "Obj_THASHI",
+ "Obj_CRVGATE",
+ "Obj_CRVFENCE",
+ "Obj_CRVHAHEN",
+ "Obj_CRVSTEEL",
+ "Obj_CRVLH_UP",
+ "Obj_CRVLH_DW",
+ "Obj_RIVERROCK",
+ "Obj_DUST",
+ "Obj_ITA",
+ "Obj_Window",
+ "Obj_MetalBox",
+ "Obj_BBox",
+ "OBJ_MSIMA",
+ "OBJ_MYOGAN",
+ "B_ZANTS",
+ "Obj_ChainBlock",
+ "Obj_ChainWall",
+ "Obj_KkrGate",
+ "Obj_RiderGate",
+ "Obj_Onsen",
+ "Obj_Chest",
+ "Obj_Bemos",
+ "Obj_RopeBridge",
+ "Obj_WellCover",
+ "Obj_GraveStone",
+ "Obj_ZraRock",
+ "Obj_GraRock",
+ "Obj_GrzRock",
+ "GRA_WALL",
+ "OBJ_ONSEN_FIRE",
+ "Obj_Lv6bemos",
+ "Obj_Lv6bemos2",
+ "Obj_BarDesk",
+ "Obj_DigSnow",
+ "Obj_Ytaihou",
+ "Obj_Elevator",
+ "Obj_Lv6TogeRoll",
+ "Obj_Lv6TogeTrap",
+ "Obj_Lv6Tenbin",
+ "Obj_Lv6SwGate",
+ "Obj_Lv6Lblock",
+ "Obj_Lv6ChgGate",
+ "Obj_Lv6FuriTrap",
+ "Obj_Lv6SzGate",
+ "Obj_Lv4EdShutter",
+ "Obj_Lv4Gate",
+ "Obj_Lv4PoGate",
+ "Obj_Lv4SlideWall",
+ "Obj_Lv4HsTarget",
+ "Obj_Lv7PropY",
+ "Obj_Lv7BsGate",
+ "Obj_Lv8OptiLift",
+ "Obj_Lv8KekkaiTrap",
+ "Obj_Lv8Lift",
+ "Obj_Lv8UdFloor",
+ "Obj_Lv9SwShutter",
+ "Obj_TobyHouse",
+ "Obj_poCandle",
+ "Obj_Lv4DigSand",
+ "Obj_FallObj",
+ "Obj_SmgDoor",
+ "Obj_SwLight",
+ "Obj_Avalanche",
+ "Obj_MirrorScrew",
+ "Obj_MirrorSand",
+ "Obj_MirrorTable",
+ "Obj_MirrorChain",
+ "Obj_Mirror6Pole",
+ "Obj_SwSpinner",
+ "Obj_TDoor",
+ "Obj_Lv7Bridge",
+ "Obj_zrTurara",
+ "Obj_TakaraDai",
+ "Obj_Table",
+ "Obj_CatDoor",
+ "Obj_Gake",
+ "CSTAF",
+ "Obj_Lv4RailWall",
+ "Obj_Lv4Sand",
+ "Obj_PushDoor",
+ "PushDoor",
+ "Obj_GanonWall2",
+ "Obj_Lv4Bridge",
+ "Obj_Lv4Floor",
+ "Tag_Spinner",
+ "Obj_SwHang",
+ "Obj_RotStair",
+ "Obj_MagneArm",
+ "Obj_KWheel00",
+ "Obj_KWheel01",
+ "Obj_Ychndlr",
+ "Obj_PRElvtr",
+ "Obj_MHasu",
+ "Obj_YIblltray",
+ "Obj_Lv6EGate",
+ "Obj_PDtile",
+ "Obj_PDwall",
+ "Obj_Lv4PRwall",
+ "Obj_KLift00",
+ "B_OH",
+ "Obj_Lv4Chan",
+ "Obj_Lv3R10Saka",
+ "Obj_Lv3Water",
+ "Obj_Lv3Water2",
+ "OBJ_LV3WATERB",
+ "Obj_HBombkoya",
+ "Obj_SZbridge",
+ "Obj_KakarikoBrg",
+ "Obj_OrdinBrg",
+ "Obj_BurnBox",
+ "Obj_KJgjs",
+ "OBJ_IHASI",
+ "Obj_IceBlock",
+ "Obj_VolcanicBall",
+ "Obj_VolcanicBomb",
+ "Obj_VolcGnd",
+ "Obj_KKanban",
+ "E_PH",
+ "NPC_ZRA",
+ "Obj_Chandelier",
+ "Obj_Stopper2",
+ "DOOR20",
+ "Tag_Hinit",
+ "Tag_Hjump",
+ "Tag_AJnot",
+ "Tag_Hstop",
+ "CANOE",
+ "HORSE",
+ "E_WB",
+ "OBJ_ITO",
+ "OBJ_SW",
+ "SPINNER",
+ "B_OB",
+ "KAGO",
+ "E_YC",
+ "B_DS",
+ "B_DR",
+ "B_ZANTZ",
+ "B_ZANT",
+ "B_ZANTM",
+ "TBOX",
+ "TBOX2",
+ "ALINK",
+ "BOOMERANG",
+ "MIDNA",
+ "NPC_TK",
+ "NPC_WORM",
+ "PPolamp",
+ "BkyRock",
+ "HITOBJ",
+ "EP",
+ "COW",
+ "PERU",
+ "NI",
+ "NPC_TKJ2",
+ "SQ",
+ "NPC_SQ",
+ "DO",
+ "NPC_NE",
+ "NPC_TR",
+ "NPC_LF",
+ "OBJ_FOOD",
+ "OBJ_KI",
+ "OBJ_KITA",
+ "OBJ_KEY",
+ "OBJ_KEYHOLE",
+ "Obj_Lv5Key",
+ "OBJ_LP",
+ "OBJ_TATIGI",
+ "OBJ_ROCK",
+ "OBJ_WFLAG",
+ "OBJ_KAGE",
+ "OBJ_KANBAN2",
+ "OBJ_BALLOON",
+ "OBJ_SUISYA",
+ "OBJ_OILTUBO",
+ "OBJ_ROTEN",
+ "OBJ_SSDRINK",
+ "OBJ_SSITEM",
+ "TAG_SSDRINK",
+ "TAG_BTLITM",
+ "TAG_LV5SOUP",
+ "TAG_MNLIGHT",
+ "TAG_SHOPCAM",
+ "TAG_SHOPITM",
+ "OBJ_NDOOR",
+ "OBJ_UDOOR",
+ "OBJ_USAKU",
+ "Obj_SM_DOOR",
+ "OBJ_BED",
+ "OBJ_BOUMATO",
+ "OBJ_ITAMATO",
+ "OBJ_NOUGU",
+ "OBJ_STICK",
+ "OBJ_MIE",
+ "OBJ_SEKIDOOR",
+ "OBJ_SEKIZO",
+ "OBJ_SMTILE",
+ "NPC_FISH",
+ "MG_FISH",
+ "FSHOP",
+ "NPC_DU",
+ "DISAPPEAR",
+ "Obj_Mato",
+ "Obj_Flag",
+ "Obj_Flag2",
+ "Obj_Flag3",
+ "Obj_GOMIKABE",
+ "Obj_Yousei",
+ "Obj_Kabuto",
+ "Obj_Cho",
+ "Obj_Kuw",
+ "Obj_Nan",
+ "Obj_Dan",
+ "Obj_Kam",
+ "Obj_Ten",
+ "Obj_Ari",
+ "Obj_Kag",
+ "Obj_Batta",
+ "Obj_Tombo",
+ "Obj_Kat",
+ "Obj_H_Saku",
+ "Obj_Yobikusa",
+ "Obj_KazeNeko",
+ "Obj_KznkArm",
+ "Obj_NamePlate",
+ "Obj_OnCloth",
+ "Obj_LndRope",
+ "Obj_ItaRope",
+ "Obj_Sakuita",
+ "Obj_Laundry",
+ "WarpBug",
+ "Izumi_Gate",
+ "Obj_Fchain",
+ "Obj_Wchain",
+ "Tag_Attp",
+ "Obj_Tornado",
+ "Obj_Tornado2",
+ "Obj_FirePillar",
+ "Obj_FirePillar2",
+ "Obj_InoBone",
+ "Obj_Stopper",
+ "Obj_MHole",
+ "Tag_Magne",
+ "Obj_BossWarp",
+ "Obj_WoodPendulum",
+ "Obj_WdStick",
+ "Obj_StairBlock",
+ "Obj_Geyser",
+ "Tag_KtOnFire",
+ "Obj_FireWood",
+ "Obj_FireWood2",
+ "Obj_GpTaru",
+ "Obj_OnsenTaru",
+ "Obj_KiPot",
+ "TBOX_SW",
+ "Obj_SwChain",
+ "Obj_WoodenSword",
+ "Obj_StoneMark",
+ "Obj_Lv3Candle",
+ "Tag_Lv4Candle",
+ "Tag_Lv4CandleDm",
+ "Obj_DamCps",
+ "Obj_Smoke",
+ "Obj_WaterFall",
+ "Obj_ZoraCloth",
+ "Obj_poFire",
+ "Tag_poFire",
+ "Obj_glowSphere",
+ "Tag_LightBall",
+ "SwLBall",
+ "SwBall",
+ "Obj_WaterEff",
+ "Tag_RiverBack",
+ "Tag_KagoFall",
+ "Tag_Lv2PrChk",
+ "Obj_Lv4Gear",
+ "Obj_MasterSword",
+ "Obj_WoodStatue",
+ "Obj_Fan",
+ "Obj_IceLeaf",
+ "Obj_zrTuraraRc",
+ "Tag_RetRoom",
+ "Obj_WindStone",
+ "Tag_WaraHowl",
+ "Obj_SCannon",
+ "Obj_SmWStone",
+ "Obj_SCannonCrs",
+ "Tag_SnowEff",
+ "Tag_CstaSw",
+ "Tag_Lv6CstaSw",
+ "Obj_awaPlar",
+ "Obj_poTbox",
+ "Obj_TimeFire",
+ "Obj_TMoon",
+ "Obj_GanonWall",
+ "Obj_Prop",
+ "CSTATUE",
+ "Obj_SwBallA",
+ "Obj_SwBallB",
+ "Obj_SnowSoup",
+ "Obj_Nagaisu",
+ "Obj_RCircle",
+ "Obj_Picture",
+ "Tag_SetBall",
+ "Tag_SmkEmt",
+ "SwTime",
+ "Obj_HFtr",
+ "Obj_HBarrel",
+ "Obj_Crystal",
+ "Obj_SCannonTen",
+ "Obj_SwBallC",
+ "SCENE_EXIT2",
+ "Obj_Hata",
+ "Obj_ToaruMaki",
+ "Tag_AttackItem",
+ "Tag_RmbitSw",
+ "Obj_Sword",
+ "Tag_Spring",
+ "Tag_Statue",
+ "E_AI",
+ "E_GS",
+ "E_GOB",
+ "E_DD",
+ "E_DN",
+ "E_S1",
+ "E_MF",
+ "E_SG",
+ "E_BS",
+ "E_SF",
+ "E_SH",
+ "E_DF",
+ "E_GM",
+ "E_MD",
+ "E_SM",
+ "E_SM2",
+ "E_ST",
+ "E_ST_LINE",
+ "E_SB",
+ "E_TH",
+ "E_CR",
+ "E_CR_EGG",
+ "E_DB",
+ "E_DB_LEAF",
+ "E_GA",
+ "E_GB",
+ "E_HB",
+ "E_HB_LEAF",
+ "E_HZELDA",
+ "E_YD",
+ "E_YH",
+ "E_YD_LEAF",
+ "E_HM",
+ "E_TK",
+ "E_TK2",
+ "E_TK_BALL",
+ "E_RB",
+ "E_RD",
+ "E_RDB",
+ "E_RDY",
+ "E_FM",
+ "E_FS",
+ "E_PM",
+ "E_PO",
+ "E_MB",
+ "E_MK",
+ "E_MM",
+ "E_FZ",
+ "E_ZS",
+ "E_KK",
+ "E_HP",
+ "E_ZH",
+ "E_ZM",
+ "E_PZ",
+ "E_FB",
+ "E_FK",
+ "E_MS",
+ "E_NEST",
+ "E_NZ",
+ "E_BA",
+ "E_BU",
+ "E_BUG",
+ "E_BEE",
+ "E_IS",
+ "E_KG",
+ "E_KR",
+ "E_SW",
+ "E_GE",
+ "Tag_WatchGe",
+ "E_YM",
+ "E_YM_TAG",
+ "E_YMB",
+ "Tag_FWall",
+ "Tag_WaterFall",
+ "E_YK",
+ "E_YR",
+ "E_YG",
+ "E_HZ",
+ "E_WS",
+ "E_OC",
+ "E_OT",
+ "E_DT",
+ "E_BG",
+ "E_OctBg",
+ "DR",
+ "L7lowDr",
+ "L7ODR",
+ "E_TT",
+ "E_DK",
+ "E_VT",
+ "E_WW",
+ "E_GI",
+ "B_BH",
+ "B_BQ",
+ "B_GM",
+ "B_GND",
+ "B_GO",
+ "B_OH2",
+ "B_YO",
+ "B_YOI",
+ "B_TN",
+ "B_GG",
+ "B_DRE",
+ "B_MGN",
+ "E_WAP",
+ "ITEM",
+ "Obj_SmallKey",
+ "Obj_Kantera",
+ "Obj_LifeContainer",
+ "Obj_Shield",
+ "Demo_Item",
+ "ShopItem",
+ "Obj_Drop",
+ "OBJ_RW",
+ "NBOMB",
+ "TAG_CSW",
+ "TAG_QS",
+ "HOZELDA",
+ "SWC00",
+ "KNOB20",
+ "DBDOOR",
+ "BOSS_DOOR",
+ "L1BOSS_DOOR",
+ "L1MBOSS_DOOR",
+ "L5BOSS_DOOR",
+ "DSHUTTER",
+ "SPIRAL_DOOR",
+ "Tag_ChgRestart",
+ "Tag_Restart",
+ "ANDSW",
+ "ANDSW2",
+ "MYNA",
+ "NPC_GND",
+ "NPC_GRA",
+ "NPC_GRC",
+ "NPC_GRD",
+ "NPC_GRM",
+ "NPC_GRMC",
+ "NPC_GRO",
+ "NPC_GRR",
+ "NPC_GRS",
+ "NPC_GRZ",
+ "NPC_YAMID",
+ "NPC_YAMIT",
+ "NPC_YAMIS",
+ "NPC_BLUENS",
+ "NPC_KAKASHI",
+ "NPC_KDK",
+ "NPC_ARU",
+ "NPC_BANS",
+ "NPC_BESU",
+ "NPC_BOU",
+ "NPC_BOU_S",
+ "NPC_CLERKA",
+ "NPC_CLERKB",
+ "NPC_CLERKT",
+ "NPC_WRESTLER",
+ "Tag_Arena",
+ "Tag_Instruction",
+ "NPC_DOC",
+ "NPC_GWOLF",
+ "NPC_LEN",
+ "NPC_LUD",
+ "NPC_FAIRY_SEIREI",
+ "NPC_FAIRY",
+ "NPC_HANJO",
+ "NPC_HENNA",
+ "NPC_HENNA0",
+ "NPC_HOZ",
+ "NPC_JAGAR",
+ "NPC_KKRI",
+ "NPC_KN",
+ "KN_BULLET",
+ "NPC_KNJ",
+ "NPC_KOLIN",
+ "NPC_KOLINB",
+ "NPC_KYURY",
+ "NPC_MARO",
+ "NPC_MIDP",
+ "NPC_MOI",
+ "NPC_RACA",
+ "NPC_SARU",
+ "NPC_SEIB",
+ "NPC_SEIC",
+ "NPC_SEID",
+ "NPC_SEIRA",
+ "NPC_SERA2",
+ "NPC_SEIREI",
+ "NPC_SHAMAN",
+ "NPC_SMARO",
+ "NPC_SOLA",
+ "NPC_TARO",
+ "NPC_PACHI_BESU",
+ "NPC_PACHI_TARO",
+ "NPC_PACHI_MARO",
+ "TAG_PATI",
+ "NPC_THE",
+ "NPC_TKJ",
+ "NPC_TKS",
+ "NPC_TKC",
+ "OBJ_TKS",
+ "NPC_TOBY",
+ "NPC_URI",
+ "NPC_YELIA",
+ "NPC_YKM",
+ "NPC_YKW",
+ "NPC_ZANB",
+ "NPC_ZANT",
+ "NPC_ZELDA",
+ "NPC_ZELR",
+ "NPC_ZELRO",
+ "OBJ_ZRAFREEZE",
+ "NPC_ZRC",
+ "NPC_ZRZ",
+ "ZRA_MARK",
+ "MYNA2",
+ "TAG_MYNA2",
+ "NPC_CD3",
+ "Tag_Schedule",
+ "Tag_Escape",
+ "NPC_CHAT",
+ "NPC_SOLDIERa",
+ "NPC_SOLDIERb",
+ "PASSER_MNG",
+ "NPC_PASSER",
+ "NPC_PASSER2",
+ "NPC_POST",
+ "NPC_POUYA",
+ "FORMATION_MNG",
+ "NPC_FGUARD",
+ "GUARD_MNG",
+ "TAG_GUARD",
+ "NPC_GUARD",
+ "NPC_ASH",
+ "NPC_ASHB",
+ "NPC_SHAD",
+ "NPC_RAFREL",
+ "NPC_MOIR",
+ "NPC_IMPAL",
+ "NPC_SHOE",
+ "NPC_DOORBOY",
+ "NPC_PRAYER",
+ "NPC_KASIHANA",
+ "NPC_KASIKYU",
+ "NPC_KASIMICH",
+ "NPC_DRSOL",
+ "NPC_CHIN",
+ "NPC_INS",
+ "NPC_SHOP0",
+ "NPC_MK",
+ "NPC_P2",
+ "KYTAG00",
+ "KYTAG01",
+ "KYTAG02",
+ "KYTAG03",
+ "KYTAG04",
+ "KYTAG05",
+ "KYTAG06",
+ "KYTAG07",
+ "KYTAG08",
+ "KYTAG09",
+ "KYTAG10",
+ "KYTAG11",
+ "KYTAG12",
+ "KYTAG13",
+ "KYTAG14",
+ "KYTAG15",
+ "KYTAG16",
+ "KYTAG17",
+ "Ykgr",
+ "TALK",
+ "Obj_Crope",
+ "Obj_Bombf",
+ "Obj_BkLeaf",
+ "Tag_Mhint",
+ "Tag_Mmsg",
+ "Tag_Mwait",
+ "Tag_Mstop",
+ "Tag_Stream",
+ "Tag_Sppath",
+ "Tag_Wljump",
+ "Tag_TWGate",
+ "Tag_Lv6Gate",
+ "Tag_Lv7Gate",
+ "Tag_Lv8Gate",
+ "Tag_TheBHint",
+ "Tag_Assist",
+ "DEMO00",
+ "TAG_CAMERA",
+ "TAG_CHKPOINT",
+ "TAG_EVENT",
+ "TAG_EVT",
+ "TAG_TELOP",
+ "TAG_HOWL",
+ "TAG_MSG",
+ "TAG_LANTERN",
+ "Tag_Mist",
+ "DMIDNA",
+ "KY_THUNDER",
+ "VRBOX",
+ "VRBOX2",
+ "BG",
+ "SET_BG_OBJ",
+ "BG_OBJ",
+ "MIRROR",
+ "MOVIE_PLAYER",
+ "TITLE",
+ "FR",
+ "ECONT",
+ "MG_ROD",
+ "E_ARROW",
+ "BULLET",
+ "SWHIT0",
+ "E_TH_BALL",
+ "TAG_EVTAREA",
+ "TAG_EVTMSG",
+ "TAG_KMSG",
+ "TAG_PUSH",
+ "E_MK_BO",
+ "E_MM_MT",
+ "OBJ_KBOX",
+ "OBJ_FW",
+ "B_GOS",
+ "OBJ_YSTONE",
+ "MANT",
+ "CROD",
+ "OBJ_PLEAF",
+ "OBJ_KBACKET",
+ "OBJ_YBAG",
+ "OBJ_PUMPKIN",
+ "OBJ_AUTOMATA",
+ "OBJ_GADGET",
+ "OBJ_KAGO",
+ "Obj_Carry",
+ "Obj_Stone",
+ "OBJ_HB",
+ "NPC_INKO",
+ "BD",
+ "Obj_Eff",
+ "WPILLAR",
+ "WMARK",
+ "E_BI",
+ "E_BI_LEAF",
+ "START_AND_GOAL",
+ "NPC_DF",
+ "ARROW",
+ "PATH_LINE",
+ "TAG_ALLMATO",
+ "Obj_Timer",
+ "SCENE_EXIT",
+ "CAMERA",
+ "CAMERA2",
+ "SUSPEND",
+ "GRASS",
+ "KYEFF",
+ "KYEFF2",
+ "MSG_OBJECT",
+ "MENUWINDOW",
+ "TIMER",
+ "METER2",
+ "GAMEOVER",
+ "DUMMY",
+ NULL,
+ };
+
+ return namelist[i_name];
+}
+
+#endif
diff --git a/src/f_pc/f_pc_delete_tag.cpp b/src/f_pc/f_pc_delete_tag.cpp
index 6e4b91f584..6fc016bac5 100644
--- a/src/f_pc/f_pc_delete_tag.cpp
+++ b/src/f_pc/f_pc_delete_tag.cpp
@@ -5,13 +5,18 @@
#include "SSystem/SComponent/c_list.h"
#include "f_pc/f_pc_delete_tag.h"
+#include "f_pc/f_pc_debug_sv.h"
/* 803A39A0-803A39B0 000C+04 s=2 e=1 z=0 None .data g_fpcDtTg_Queue */
node_list_class g_fpcDtTg_Queue = {NULL, NULL, 0};
/* 80020F30-80020F48 0018+00 s=0 e=1 z=0 None .text fpcDtTg_IsEmpty__Fv */
BOOL fpcDtTg_IsEmpty() {
- return g_fpcDtTg_Queue.mSize == 0 ? TRUE : FALSE;
+ if (g_fpcDtTg_Queue.mSize == 0) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
}
/* 80020F48-80020F7C 0034+00 s=1 e=1 z=0 None .text fpcDtTg_ToDeleteQ__FP16delete_tag_class */
@@ -28,12 +33,18 @@ void fpcDtTg_DeleteQTo(delete_tag_class* i_deleteTag) {
/* 80020F9C-8002101C 0080+00 s=0 e=1 z=0 None .text fpcDtTg_Do__FP16delete_tag_classPFPv_i */
s32 fpcDtTg_Do(delete_tag_class* i_deleteTag, delete_tag_func i_func) {
if (i_deleteTag->timer <= 0) {
- s32 ret;
fpcDtTg_DeleteQTo(i_deleteTag);
- ret = i_func(i_deleteTag->base.mpTagData);
- if (ret == 0) {
+ if (i_func(i_deleteTag->base.mpTagData) == 0) {
fpcDtTg_ToDeleteQ(i_deleteTag);
+#ifdef DEBUG
+ if (i_deleteTag->unk_0x1c-- <= 0) {
+ i_deleteTag->unk_0x1c = 0;
+ if (g_fpcDbSv_service[4] != NULL) {
+ g_fpcDbSv_service[4](i_deleteTag->base.mpTagData);
+ }
+ }
+#endif
return 0;
} else {
return 1;
diff --git a/src/f_pc/f_pc_deletor.cpp b/src/f_pc/f_pc_deletor.cpp
index 1f66d6abb0..e365371927 100644
--- a/src/f_pc/f_pc_deletor.cpp
+++ b/src/f_pc/f_pc_deletor.cpp
@@ -9,6 +9,7 @@
#include "f_pc/f_pc_executor.h"
#include "f_pc/f_pc_load.h"
#include "f_pc/f_pc_node.h"
+#include "f_pc/f_pc_debug_sv.h"
#include "JSystem/JUtility/JUTAssert.h"
/* 80021040-80021060 0020+00 s=0 e=1 z=0 None .text fpcDt_IsComplete__Fv */
@@ -19,6 +20,7 @@ BOOL fpcDt_IsComplete() {
/* 80021060-800210D4 0074+00 s=1 e=0 z=0 None .text fpcDt_deleteMethod__FP18base_process_class
*/
s32 fpcDt_deleteMethod(base_process_class* i_proc) {
+ fpc_ProcID id = i_proc->id;
layer_class* layer = i_proc->delete_tag.layer;
s16 profname = i_proc->profname;
@@ -36,6 +38,11 @@ s32 fpcDt_deleteMethod(base_process_class* i_proc) {
/* 800210D4-8002110C 0038+00 s=0 e=1 z=0 None .text fpcDt_Handler__Fv */
void fpcDt_Handler() {
+#ifdef DEBUG
+ if (g_fpcDbSv_service[6] != NULL) {
+ g_fpcDbSv_service[6](&g_fpcDtTg_Queue.mSize);
+ }
+#endif
cLsIt_Method(&g_fpcDtTg_Queue, (cNdIt_MethodFunc)fpcDtTg_Do, fpcDt_deleteMethod);
}
@@ -51,7 +58,7 @@ s32 fpcDt_ToQueue(base_process_class* i_proc) {
fpcLy_DeletingMesg(i_proc->layer_tag.layer);
return 1;
}
-
+
return 0;
}
@@ -66,18 +73,16 @@ s32 fpcDt_ToDeleteQ(base_process_class* i_proc) {
}
if (fpcBs_Is_JustOfType(g_fpcNd_type, i_proc->subtype)) {
- process_node_class* node = (process_node_class*)i_proc;
- if (fpcNd_IsDeleteTiming(node) == 0) {
+ if (fpcNd_IsDeleteTiming((process_node_class*)i_proc) == 0) {
return 0;
}
- layer_class* layer = &node->layer;
+ layer_class* layer = &((process_node_class*)i_proc)->layer;
if (fpcLy_Cancel(layer) == 0) {
- JUT_ASSERT(0);
+ JUT_ASSERT(196, 0);
}
-
if (fpcLyIt_OnlyHereLY(layer, (fpcLyIt_OnlyHereFunc)fpcDt_ToDeleteQ, NULL) == 0)
{
return 0;
@@ -105,14 +110,32 @@ s32 fpcDt_ToDeleteQ(base_process_class* i_proc) {
/* 800212A4-80021308 0064+00 s=0 e=3 z=0 None .text fpcDt_Delete__FPv */
s32 fpcDt_Delete(void* i_proc) {
base_process_class* proc = (base_process_class*)i_proc;
+
if (proc != NULL) {
+#ifdef DEBUG
+ if (!fpcBs_Is_JustOfType(g_fpcBs_type, proc->type)) {
+ if (g_fpcDbSv_service[12] != NULL) {
+ g_fpcDbSv_service[12](proc);
+ }
+
+ return 0;
+ }
+#endif
if (fpcCt_IsDoing(proc) == TRUE)
return 0;
if (proc->init_state == 3)
return 0;
- return fpcDt_ToDeleteQ(proc);
+ int ret = fpcDt_ToDeleteQ(proc);
+#ifdef DEBUG
+ if (ret == 0) {
+ if (g_fpcDbSv_service[5] != NULL) {
+ g_fpcDbSv_service[5](proc);
+ }
+ }
+#endif
+ return ret;
}
return 1;
diff --git a/src/f_pc/f_pc_executor.cpp b/src/f_pc/f_pc_executor.cpp
index c0e0c53239..bf23306ac1 100644
--- a/src/f_pc/f_pc_executor.cpp
+++ b/src/f_pc/f_pc_executor.cpp
@@ -7,6 +7,7 @@
#include "f_pc/f_pc_node.h"
#include "f_pc/f_pc_pause.h"
#include "f_pc/f_pc_searcher.h"
+#include "f_pc/f_pc_debug_sv.h"
/* 80021338-80021358 0020+00 s=1 e=9 z=291 None .text fpcEx_Search__FPFPvPv_PvPv */
base_process_class* fpcEx_Search(fpcLyIt_JudgeFunc i_judgeFunc, void* i_data) {
@@ -23,7 +24,11 @@ base_process_class* fpcEx_SearchByID(fpc_ProcID i_id) {
/* 8002139C-800213C4 0028+00 s=0 e=7 z=42 None .text fpcEx_IsExist__FUi */
BOOL fpcEx_IsExist(fpc_ProcID i_id) {
- return fpcEx_SearchByID(i_id) != NULL ? TRUE : FALSE;
+ if (fpcEx_SearchByID(i_id) != NULL) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
}
/* 800213C4-80021418 0054+00 s=0 e=1 z=0 None .text fpcEx_Execute__FP18base_process_class */
@@ -36,20 +41,24 @@ s32 fpcEx_Execute(base_process_class* i_proc) {
/* 80021418-800214C4 00AC+00 s=1 e=0 z=0 None .text fpcEx_ToLineQ__FP18base_process_class */
s32 fpcEx_ToLineQ(base_process_class* i_proc) {
- layer_class* layer = i_proc->layer_tag.layer;
- base_process_class* process = &layer->process_node->base;
+ base_process_class* process = &i_proc->layer_tag.layer->process_node->base;
- if (layer->layer_id == fpcLy_ROOT_e || cTg_IsUse(&process->line_tag_.base) == TRUE) {
- s32 ret = fpcLnTg_ToQueue(&i_proc->line_tag_, i_proc->priority.current_info.list_id);
- if (ret == 0) {
+ if (i_proc->layer_tag.layer->layer_id == fpcLy_ROOT_e || cTg_IsUse(&process->line_tag_.base) == TRUE) {
+ int var_r28 = i_proc->priority.current_info.list_id;
+ if (fpcLnTg_ToQueue(&i_proc->line_tag_, var_r28) == 0) {
fpcLyTg_QueueTo(&i_proc->layer_tag);
return 0;
}
+#ifdef DEBUG
+ if (g_fpcDbSv_service[1] != NULL) {
+ g_fpcDbSv_service[1](i_proc);
+ }
+#endif
+
i_proc->init_state = 2;
if (fpcBs_Is_JustOfType(g_fpcNd_type, i_proc->subtype)) {
- process_node_class* node = (process_node_class*)i_proc;
- fpcLyIt_OnlyHere(&node->layer, (fpcLyIt_OnlyHereFunc)fpcEx_ToLineQ, node);
+ fpcLyIt_OnlyHere(&((process_node_class*)i_proc)->layer, (fpcLyIt_OnlyHereFunc)fpcEx_ToLineQ, i_proc);
}
return 1;
@@ -61,8 +70,7 @@ s32 fpcEx_ToLineQ(base_process_class* i_proc) {
/* 800214C4-80021510 004C+00 s=0 e=1 z=0 None .text fpcEx_ExecuteQTo__FP18base_process_class
*/
s32 fpcEx_ExecuteQTo(base_process_class* i_proc) {
- s32 ret = fpcLyTg_QueueTo(&i_proc->layer_tag);
- if (ret == 1) {
+ if (fpcLyTg_QueueTo(&i_proc->layer_tag) == 1) {
i_proc->init_state = 3;
return 1;
}
@@ -73,9 +81,8 @@ s32 fpcEx_ExecuteQTo(base_process_class* i_proc) {
/* 80021510-80021568 0058+00 s=0 e=1 z=0 None .text fpcEx_ToExecuteQ__FP18base_process_class
*/
s32 fpcEx_ToExecuteQ(base_process_class* i_proc) {
- s32 ret = fpcLyTg_ToQueue(&i_proc->layer_tag, i_proc->priority.current_info.layer_id,
- i_proc->priority.current_info.list_id, i_proc->priority.current_info.list_priority);
- if (ret == 1) {
+ process_priority_class* priority = &i_proc->priority;
+ if (fpcLyTg_ToQueue(&i_proc->layer_tag, priority->current_info.layer_id, priority->current_info.list_id, priority->current_info.list_priority) == 1) {
fpcEx_ToLineQ(i_proc);
return 1;
}
diff --git a/src/f_pc/f_pc_layer.cpp b/src/f_pc/f_pc_layer.cpp
index 92b24cd021..b25c1d56bf 100644
--- a/src/f_pc/f_pc_layer.cpp
+++ b/src/f_pc/f_pc_layer.cpp
@@ -21,31 +21,47 @@ s32 fpcLy_ToCancelQ(layer_class* i_layer, process_method_tag_class* i_methods) {
/* 800215CC-800215F8 002C+00 s=1 e=0 z=0 None .text
* fpcLy_CancelMethod__FP24process_method_tag_class */
-bool fpcLy_CancelMethod(process_method_tag_class* i_layer) {
- return fpcMtdTg_Do(i_layer) == 1;
+BOOL fpcLy_CancelMethod(process_method_tag_class* i_layer) {
+ if (fpcMtdTg_Do(i_layer) == 1) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
}
/* 800215F8-8002161C 0024+00 s=0 e=1 z=0 None .text
* fpcLy_IntoQueue__FP11layer_classiP16create_tag_classi */
s32 fpcLy_IntoQueue(layer_class* i_layer, int i_treeListNo, create_tag_class* i_createTag, int i_no) {
- return cTg_InsertToTree(&i_layer->node_tree, i_treeListNo, i_createTag, i_no);
+ int ret = cTg_InsertToTree(&i_layer->node_tree, i_treeListNo, i_createTag, i_no);
+ return ret;
}
/* 8002161C-80021640 0024+00 s=0 e=1 z=0 None .text
* fpcLy_ToQueue__FP11layer_classiP16create_tag_class */
s32 fpcLy_ToQueue(layer_class* i_layer, int i_treeListNo, create_tag_class* i_createTag) {
- return cTg_AdditionToTree(&i_layer->node_tree, i_treeListNo, i_createTag);
+ int ret = cTg_AdditionToTree(&i_layer->node_tree, i_treeListNo, i_createTag);
+ return ret;
}
/* 80021640-80021664 0024+00 s=0 e=1 z=0 None .text
* fpcLy_QueueTo__FP11layer_classP16create_tag_class */
s32 fpcLy_QueueTo(layer_class* i_layer, create_tag_class* i_createTag) {
- return cTg_SingleCutFromTree(i_createTag);
+ i_layer;
+
+ int ret = cTg_SingleCutFromTree(i_createTag);
+ return ret;
}
/* 80021664-80021678 0014+00 s=0 e=1 z=0 None .text fpcLy_IsDeletingMesg__FP11layer_class */
BOOL fpcLy_IsDeletingMesg(layer_class* i_layer) {
- return i_layer->counts.delete_count > 0;
+ BOOL ret;
+ if (i_layer->counts.delete_count > 0) {
+ ret = TRUE;
+ } else {
+ ret = FALSE;
+ }
+
+ return ret;
}
/* 80021678-80021688 0010+00 s=0 e=1 z=0 None .text fpcLy_DeletingMesg__FP11layer_class */
@@ -62,7 +78,14 @@ void fpcLy_DeletedMesg(layer_class* i_layer) {
/* 800216A0-800216B4 0014+00 s=0 e=2 z=0 None .text fpcLy_IsCreatingMesg__FP11layer_class */
BOOL fpcLy_IsCreatingMesg(layer_class* i_layer) {
- return i_layer->counts.create_count > 0;
+ BOOL ret;
+ if (i_layer->counts.create_count > 0) {
+ ret = TRUE;
+ } else {
+ ret = FALSE;
+ }
+
+ return ret;
}
/* 800216B4-800216C4 0010+00 s=0 e=2 z=0 None .text fpcLy_CreatingMesg__FP11layer_class */
diff --git a/src/f_pc/f_pc_layer_iter.cpp b/src/f_pc/f_pc_layer_iter.cpp
index 9ffd197f0e..7e92cc3081 100644
--- a/src/f_pc/f_pc_layer_iter.cpp
+++ b/src/f_pc/f_pc_layer_iter.cpp
@@ -30,6 +30,23 @@ s32 fpcLyIt_OnlyHereLY(layer_class* i_layer, fpcLyIt_OnlyHereFunc i_func, void*
return result;
}
+s32 fpcLyIt_All(fpcLyIt_OnlyHereFunc i_func, void* i_data) {
+ int ret = 1;
+
+ layer_iter iter;
+ layer_class* layer;
+ iter.func = i_func;
+ iter.data = i_data;
+
+ for (layer = fpcLy_RootLayer(); layer != NULL; layer = (layer_class*)layer->node.mpNextNode) {
+ if (cTrIt_Method(&layer->node_tree, (cNdIt_MethodFunc)cTgIt_MethodCall, &iter) == 0) {
+ ret = 0;
+ }
+ }
+
+ return ret;
+}
+
/* 80021C28-80021C60 0038+00 s=0 e=3 z=0 None .text fpcLyIt_Judge__FP11layer_classPFPvPv_PvPv
*/
void* fpcLyIt_Judge(layer_class* i_layer, fpcLyIt_JudgeFunc i_func, void* i_data) {
@@ -41,19 +58,19 @@ void* fpcLyIt_Judge(layer_class* i_layer, fpcLyIt_JudgeFunc i_func, void* i_data
/* 80021C60-80021CD4 0074+00 s=0 e=1 z=4 None .text fpcLyIt_AllJudge__FPFPvPv_PvPv */
void* fpcLyIt_AllJudge(fpcLyIt_JudgeFunc i_func, void* i_data) {
+ void* ret;
+
layer_iter iter;
- layer_class* current;
+ layer_class* layer;
iter.func = i_func;
iter.data = i_data;
- current = fpcLy_RootLayer();
- while (current != NULL) {
- void* result =
- cTrIt_Judge(&current->node_tree, (cNdIt_JudgeFunc)cTgIt_JudgeFilter, &iter);
- if (result != NULL) {
- return result;
+ for (layer = fpcLy_RootLayer(); layer != NULL; layer = (layer_class*)layer->node.mpNextNode) {
+ ret = cTrIt_Judge(&layer->node_tree, (cNdIt_JudgeFunc)cTgIt_JudgeFilter, &iter);
+ if (ret != NULL) {
+ return ret;
}
- current = (layer_class*)current->node.mpNextNode;
}
+
return NULL;
}
diff --git a/src/f_pc/f_pc_leaf.cpp b/src/f_pc/f_pc_leaf.cpp
index 52cebcc4bc..b1906bf733 100644
--- a/src/f_pc/f_pc_leaf.cpp
+++ b/src/f_pc/f_pc_leaf.cpp
@@ -4,6 +4,7 @@
*/
#include "f_pc/f_pc_leaf.h"
+#include "f_pc/f_pc_debug_sv.h"
/* 80021A00-80021A24 0024+00 s=0 e=4 z=2 None .text fpcLf_GetPriority__FPC14leafdraw_class */
s16 fpcLf_GetPriority(const leafdraw_class* i_leaf) {
@@ -26,6 +27,14 @@ s32 fpcLf_Draw(leafdraw_class* i_leaf) {
/* 80021A80-80021AA8 0028+00 s=1 e=0 z=0 None .text fpcLf_Execute__FP14leafdraw_class */
s32 fpcLf_Execute(leafdraw_class* i_leaf) {
+#ifdef DEBUG
+ if (fpcBs_Is_JustOfType(g_fpcLf_type, i_leaf->base.subtype) == 0) {
+ if (g_fpcDbSv_service[12] != NULL) {
+ g_fpcDbSv_service[12](i_leaf);
+ }
+ return 0;
+ }
+#endif
return fpcMtd_Execute(&i_leaf->leaf_methods->base, i_leaf);
}
@@ -48,16 +57,16 @@ int g_fpcLf_type;
/* 80021B14-80021B88 0074+00 s=1 e=0 z=0 None .text fpcLf_Create__FP14leafdraw_class */
s32 fpcLf_Create(leafdraw_class* i_leaf) {
- leaf_process_profile_definition* pprofile;
if (i_leaf->base.init_state == 0) {
- pprofile = (leaf_process_profile_definition*)i_leaf->base.profile;
+ leaf_process_profile_definition* pprofile = (leaf_process_profile_definition*)i_leaf->base.profile;
i_leaf->leaf_methods = pprofile->sub_method;
i_leaf->base.subtype = fpcBs_MakeOfType(&g_fpcLf_type);
fpcDwPi_Init(&i_leaf->draw_priority, pprofile->priority);
i_leaf->unk_0xBC = 0;
}
- return fpcMtd_Create(&i_leaf->leaf_methods->base, i_leaf);
+ int ret = fpcMtd_Create(&i_leaf->leaf_methods->base, i_leaf);
+ return ret;
}
/* 803A39E8-803A3A00 0014+04 s=0 e=27 z=756 None .data g_fpcLf_Method */
diff --git a/src/f_pc/f_pc_line_tag.cpp b/src/f_pc/f_pc_line_tag.cpp
index 8f8e59f26d..0745775989 100644
--- a/src/f_pc/f_pc_line_tag.cpp
+++ b/src/f_pc/f_pc_line_tag.cpp
@@ -25,9 +25,7 @@ void fpcLnTg_QueueTo(line_tag* i_lineTag) {
/* 80023634-8002368C 0058+00 s=1 e=1 z=1 None .text fpcLnTg_ToQueue__FP8line_tagi */
s32 fpcLnTg_ToQueue(line_tag* i_lineTag, int lineListID) {
- s32 ret = cTg_AdditionToTree(&g_fpcLn_Queue, lineListID, &i_lineTag->base);
-
- if (ret) {
+ if (cTg_AdditionToTree(&g_fpcLn_Queue, lineListID, &i_lineTag->base)) {
i_lineTag->list_id = lineListID;
return 1;
} else {
diff --git a/src/f_pc/f_pc_load.cpp b/src/f_pc/f_pc_load.cpp
index a45944f2bf..5f845b00cd 100644
--- a/src/f_pc/f_pc_load.cpp
+++ b/src/f_pc/f_pc_load.cpp
@@ -26,9 +26,7 @@ void fpcLd_Free(s16 i_procName) {
/* 80022050-800220A0 0050+00 s=1 e=1 z=0 None .text fpcLd_Load__Fs */
s32 fpcLd_Load(s16 i_procName) {
- s32 phase = cDyl_LinkASync((s16)i_procName);
-
- switch (phase) {
+ switch (cDyl_LinkASync((s16)i_procName)) {
case cPhs_COMPLEATE_e:
return cPhs_COMPLEATE_e;
case cPhs_INIT_e:
diff --git a/src/f_pc/f_pc_manager.cpp b/src/f_pc/f_pc_manager.cpp
index 6b17d0f9b1..376bc52b08 100644
--- a/src/f_pc/f_pc_manager.cpp
+++ b/src/f_pc/f_pc_manager.cpp
@@ -65,8 +65,13 @@ void fpcM_Management(fpcM_ManagementFunc i_preExecuteFn, fpcM_ManagementFunc i_p
dPa_control_c::offStatus(1);
}
- fpcPi_Handler();
- fpcCt_Handler();
+ if (!fpcPi_Handler()) {
+ JUT_ASSERT(353, 0);
+ }
+
+ if (!fpcCt_Handler()) {
+ JUT_ASSERT(357, 0);
+ }
if (i_preExecuteFn != NULL) {
i_preExecuteFn();
@@ -126,10 +131,10 @@ void* fpcM_JudgeInLayer(fpc_ProcID i_layerID, fpcCtIt_JudgeFunc i_judgeFunc, voi
if (layer != NULL) {
void* ret = fpcCtIt_JudgeInLayer(i_layerID, i_judgeFunc, i_data);
if (ret == NULL) {
- ret = fpcLyIt_Judge(layer, i_judgeFunc, i_data);
+ return fpcLyIt_Judge(layer, i_judgeFunc, i_data);
}
return ret;
- } else {
- return NULL;
}
+
+ return NULL;
}
diff --git a/src/f_pc/f_pc_node.cpp b/src/f_pc/f_pc_node.cpp
index 0a0156eb06..72828c7968 100644
--- a/src/f_pc/f_pc_node.cpp
+++ b/src/f_pc/f_pc_node.cpp
@@ -5,6 +5,7 @@
#include "f_pc/f_pc_node.h"
#include "f_pc/f_pc_layer_iter.h"
+#include "f_pc/f_pc_debug_sv.h"
/* 800224F0-80022514 0024+00 s=1 e=1 z=0 None .text fpcNd_DrawMethod__FP21nodedraw_method_classPv
*/
@@ -15,9 +16,11 @@ s32 fpcNd_DrawMethod(nodedraw_method_class* i_method_class, void* i_data) {
/* 80022514-80022580 006C+00 s=1 e=0 z=0 None .text fpcNd_Draw__FP18process_node_class */
s32 fpcNd_Draw(process_node_class* i_procNode) {
s32 ret = 0;
+ process_node_class* var_r28 = i_procNode;
+
if (i_procNode->unk_0x1A8 == 0) {
layer_class* save_layer = fpcLy_CurrentLayer();
- fpcLy_SetCurrentLayer(&i_procNode->layer);
+ fpcLy_SetCurrentLayer(&var_r28->layer);
ret = fpcNd_DrawMethod(i_procNode->nodedraw_method, i_procNode);
fpcLy_SetCurrentLayer(save_layer);
}
@@ -27,8 +30,18 @@ s32 fpcNd_Draw(process_node_class* i_procNode) {
/* 80022580-800225DC 005C+00 s=1 e=0 z=0 None .text fpcNd_Execute__FP18process_node_class */
s32 fpcNd_Execute(process_node_class* i_procNode) {
- s32 ret;
+ s32 ret = 0;
layer_class* save_layer = fpcLy_CurrentLayer();
+
+#ifdef DEBUG
+ if (fpcBs_Is_JustOfType(g_fpcNd_type, i_procNode->base.subtype) == 0) {
+ if (g_fpcDbSv_service[11] != NULL) {
+ g_fpcDbSv_service[11](i_procNode);
+ }
+ return 0;
+ }
+#endif
+
fpcLy_SetCurrentLayer(&i_procNode->layer);
ret = fpcMtd_Execute(&i_procNode->nodedraw_method->base, i_procNode);
fpcLy_SetCurrentLayer(save_layer);
@@ -111,4 +124,5 @@ s32 fpcNd_Create(process_node_class* i_procNode) {
nodedraw_method_class g_fpcNd_Method = {
(process_method_func)fpcNd_Create, (process_method_func)fpcNd_Delete,
(process_method_func)fpcNd_Execute, (process_method_func)fpcNd_IsDelete,
- (process_method_func)fpcNd_Draw};
+ (process_method_func)fpcNd_Draw,
+};
diff --git a/src/f_pc/f_pc_node_req.cpp b/src/f_pc/f_pc_node_req.cpp
index 7ca99d7d84..b608828d59 100644
--- a/src/f_pc/f_pc_node_req.cpp
+++ b/src/f_pc/f_pc_node_req.cpp
@@ -11,6 +11,7 @@
#include "f_pc/f_pc_node.h"
#include "f_pc/f_pc_stdcreate_req.h"
#include "f_pc/f_pc_manager.h"
+#include "f_pc/f_pc_debug_sv.h"
/* 800227C4-80022804 0040+00 s=1 e=0 z=0 None .text fpcNdRq_RequestQTo__FP19node_create_request
*/
@@ -35,6 +36,15 @@ void fpcNdRq_ToRequestQ(node_create_request* i_request) {
* fpcNdRq_phase_IsCreated__FP19node_create_request */
s32 fpcNdRq_phase_IsCreated(node_create_request* i_request) {
if (fpcCtRq_IsCreatingByID(i_request->creating_id) == TRUE) {
+#ifdef DEBUG
+ if (i_request->unk_0x64-- <= 0) {
+ i_request->unk_0x64 = 0;
+ if (g_fpcDbSv_service[8] != NULL) {
+ g_fpcDbSv_service[8](&i_request->creating_id);
+ }
+ }
+#endif
+
return cPhs_INIT_e;
} else if (fpcEx_IsExist(i_request->creating_id) == TRUE) {
return cPhs_NEXT_e;
@@ -67,6 +77,14 @@ s32 fpcNdRq_phase_IsDeleteTiming(node_create_request* i_request) {
* fpcNdRq_phase_IsDeleted__FP19node_create_request */
s32 fpcNdRq_phase_IsDeleted(node_create_request* i_request) {
if (fpcDt_IsComplete() == FALSE) {
+#ifdef DEBUG
+ if (i_request->unk_0x68-- <= 0) {
+ i_request->unk_0x68 = 0;
+ if (g_fpcDbSv_service[7] != NULL) {
+ g_fpcDbSv_service[7](i_request->node_proc.node);
+ }
+ }
+#endif
return cPhs_INIT_e;
}
@@ -143,6 +161,13 @@ s32 fpcNdRq_Cancel(node_create_request* i_request) {
/* 80022AFC-80022BE4 00E8+00 s=0 e=1 z=0 None .text fpcNdRq_Handler__Fv */
s32 fpcNdRq_Handler() {
node_class* node = l_fpcNdRq_Queue.mpHead;
+
+#ifdef DEBUG
+ if (g_fpcDbSv_service[9] != NULL) {
+ g_fpcDbSv_service[9](&l_fpcNdRq_Queue.mSize);
+ }
+#endif
+
while (node != NULL) {
node_create_request* req = ((request_node_class*)node)->node_create_req;
switch (req->create_req_methods->execute_method(req)) {
@@ -171,12 +196,10 @@ s32 fpcNdRq_Handler() {
* fpcNdRq_IsPossibleTarget__FP18process_node_class */
s32 fpcNdRq_IsPossibleTarget(process_node_class* i_procNode) {
fpc_ProcID id = i_procNode->base.id;
- request_node_class* req_node;
- node_create_request* create_req;
+ request_node_class* req_node = (request_node_class*)l_fpcNdRq_Queue.mpHead;
- req_node = (request_node_class*)l_fpcNdRq_Queue.mpHead;
while (req_node != NULL) {
- create_req = req_node->node_create_req;
+ node_create_request* create_req = req_node->node_create_req;
if ((create_req->parameters == 2 || create_req->parameters == 4 ||
create_req->parameters == 1) &&
create_req->node_proc.id == id)
@@ -221,7 +244,12 @@ node_create_request* fpcNdRq_Create(u32 i_requestSize) {
cTg_Create(&req->create_tag, req);
fpcMtdTg_Init(&req->method_tag, (process_method_tag_func)fpcNdRq_Cancel, req);
req->request_id = request_id++;
+#ifdef DEBUG
+ req->unk_0x64 = 60;
+ req->unk_0x68 = 60;
+#endif
}
+
return req;
}
@@ -246,9 +274,9 @@ node_create_request* fpcNdRq_ChangeNode(u32 i_requestSize, process_node_class* i
req->data = i_data;
}
return req;
- } else {
- return NULL;
}
+
+ return NULL;
}
/* 80022EB0-80022F3C 008C+00 s=1 e=0 z=0 None .text fpcNdRq_DeleteNode__FUlP18process_node_class
@@ -270,9 +298,9 @@ node_create_request* fpcNdRq_DeleteNode(u32 i_requestSize, process_node_class* i
req->layer = i_procNode->base.layer_tag.layer;
}
return req;
- } else {
- return NULL;
}
+
+ return NULL;
}
/* 80022F3C-80022FE8 00AC+00 s=1 e=0 z=0 None .text fpcNdRq_CreateNode__FUlsPv */
@@ -285,6 +313,7 @@ node_create_request* fpcNdRq_CreateNode(u32 i_requestSize, s16 i_procName, void*
layer_class* layer = fpcLy_CurrentLayer();
if (layer->layer_id != fpcLy_ROOT_e && fpcNdRq_IsPossibleTarget(layer->process_node) == 0) {
+ int sp28;
return NULL;
}
@@ -335,11 +364,10 @@ node_create_request* fpcNdRq_Request(u32 i_requestSize, int i_reqType,
/* 80023098-80023110 0078+00 s=1 e=0 z=0 None .text fpcNdRq_ReChangeNode__FUisPv */
s32 fpcNdRq_ReChangeNode(fpc_ProcID i_requestID, s16 i_procName, void* i_data) {
request_node_class* req_node;
- node_create_request* found;
req_node = (request_node_class*)l_fpcNdRq_Queue.mpHead;
while (req_node != NULL) {
- found = req_node->node_create_req;
+ node_create_request* found = req_node->node_create_req;
if (found->parameters == 2 && found->request_id == i_requestID) {
if (found->creating_id == -2) {
found->name = i_procName;
diff --git a/src/f_pc/f_pc_pause.cpp b/src/f_pc/f_pc_pause.cpp
index f39a3097d8..cef059600f 100644
--- a/src/f_pc/f_pc_pause.cpp
+++ b/src/f_pc/f_pc_pause.cpp
@@ -9,8 +9,7 @@
/* 80023844-80023868 0024+00 s=0 e=3 z=0 None .text fpcPause_IsEnable__FPvUc */
s32 fpcPause_IsEnable(void* i_proc, u8 i_flag) {
- base_process_class* pProc = (base_process_class*)i_proc;
- if ((pProc->pause_flag & i_flag) == i_flag) {
+ if ((((base_process_class*)i_proc)->pause_flag & i_flag) == i_flag) {
return 1;
} else {
return 0;
@@ -19,25 +18,22 @@ s32 fpcPause_IsEnable(void* i_proc, u8 i_flag) {
/* 80023868-800238D4 006C+00 s=0 e=1 z=0 None .text fpcPause_Enable__FPvUc */
s32 fpcPause_Enable(void* i_proc, u8 i_flag) {
- base_process_class* pProc = (base_process_class*)i_proc;
- pProc->pause_flag |= i_flag;
+ ((base_process_class*)i_proc)->pause_flag |= i_flag;
- if (fpcBs_Is_JustOfType(g_fpcNd_type, pProc->subtype)) {
- process_node_class* pNode = (process_node_class*)pProc;
- fpcLyIt_OnlyHere(&pNode->layer, (fpcLyIt_OnlyHereFunc)fpcPause_Enable,
- (void*)(i_flag & 0xFF));
+ if (fpcBs_Is_JustOfType(g_fpcNd_type, ((base_process_class*)i_proc)->subtype)) {
+ fpcLyIt_OnlyHere(&((process_node_class*)i_proc)->layer, (fpcLyIt_OnlyHereFunc)fpcPause_Enable,
+ (void*)i_flag);
}
return 1;
}
/* 800238D4-80023948 0074+00 s=0 e=1 z=0 None .text fpcPause_Disable__FPvUc */
s32 fpcPause_Disable(void* i_proc, u8 i_flag) {
- base_process_class* pProc = (base_process_class*)i_proc;
- pProc->pause_flag &= (0xFF - i_flag) & 0xFF;
+ u8 var_r31 = 0xFF - i_flag;
+ ((base_process_class*)i_proc)->pause_flag &= var_r31;
- if (fpcBs_Is_JustOfType(g_fpcNd_type, pProc->subtype)) {
- process_node_class* pNode = (process_node_class*)pProc;
- fpcLyIt_OnlyHere(&pNode->layer, (fpcLyIt_OnlyHereFunc)fpcPause_Disable, (void*)i_flag);
+ if (fpcBs_Is_JustOfType(g_fpcNd_type, ((base_process_class*)i_proc)->subtype)) {
+ fpcLyIt_OnlyHere(&((process_node_class*)i_proc)->layer, (fpcLyIt_OnlyHereFunc)fpcPause_Disable, (void*)i_flag);
}
return 1;
@@ -45,6 +41,5 @@ s32 fpcPause_Disable(void* i_proc, u8 i_flag) {
/* 80023948-80023954 000C+00 s=0 e=1 z=0 None .text fpcPause_Init__FPv */
void fpcPause_Init(void* i_proc) {
- base_process_class* pProc = (base_process_class*)i_proc;
- pProc->pause_flag = 0;
+ ((base_process_class*)i_proc)->pause_flag = 0;
}
diff --git a/src/f_pc/f_pc_priority.cpp b/src/f_pc/f_pc_priority.cpp
index f6ba909558..48a246d25c 100644
--- a/src/f_pc/f_pc_priority.cpp
+++ b/src/f_pc/f_pc_priority.cpp
@@ -49,8 +49,7 @@ process_priority_class* fpcPi_GetFromQueue() {
process_priority_class* i_procPriority = (process_priority_class*)cTg_GetFirst(&l_fpcPi_Queue);
if (i_procPriority != NULL) {
- base_process_class* process = (base_process_class*)i_procPriority->base.mpTagData;
- process_priority_class* ppriority = &process->priority;
+ process_priority_class* ppriority = &((base_process_class*)i_procPriority->base.mpTagData)->priority;
fpcLy_CancelQTo(&ppriority->method_tag);
return ppriority;
}
@@ -61,16 +60,14 @@ process_priority_class* fpcPi_GetFromQueue() {
/* 80023268-800232B4 004C+00 s=1 e=1 z=0 None .text fpcPi_Delete__FP22process_priority_class
*/
s32 fpcPi_Delete(process_priority_class* i_procPriority) {
- static process_priority_queue_info crear = {
+ static priority_id crear = {
fpcLy_NONE_e,
0xFFFF,
fpcPi_NONE_e,
};
fpcPi_QueueTo(i_procPriority);
- i_procPriority->queue_info.layer_id = crear.layer_id;
- i_procPriority->queue_info.list_id = crear.list_id;
- i_procPriority->queue_info.list_priority = crear.list_priority;
+ i_procPriority->queue_info = crear;
return 1;
}
@@ -94,9 +91,7 @@ s32 fpcPi_Change(process_priority_class* i_procPriority, fpc_ProcID i_layerID, u
if (!fpcPi_IsNormal(i_layerID, i_listID, i_priority))
return 0;
- i_procPriority->queue_info.layer_id = i_procPriority->current_info.layer_id;
- i_procPriority->queue_info.list_id = i_procPriority->current_info.list_id;
- i_procPriority->queue_info.list_priority = i_procPriority->current_info.list_priority;
+ i_procPriority->queue_info = i_procPriority->current_info;
if (i_layerID != fpcLy_CURRENT_e && i_procPriority->current_info.layer_id != i_layerID) {
i_procPriority->queue_info.layer_id = i_layerID;
@@ -114,16 +109,16 @@ s32 fpcPi_Change(process_priority_class* i_procPriority, fpc_ProcID i_layerID, u
}
if (process->init_state == 0 || process->init_state == 1) {
- i_procPriority->current_info.layer_id = i_procPriority->queue_info.layer_id;
- i_procPriority->current_info.list_id = i_procPriority->queue_info.list_id;
- i_procPriority->current_info.list_priority = i_procPriority->queue_info.list_priority;
+ i_procPriority->current_info = i_procPriority->queue_info;
return 1;
}
- if (changed == TRUE)
- return fpcPi_ToQueue(i_procPriority);
- else
- return 0;
+ if (changed == TRUE) {
+ int ret = fpcPi_ToQueue(i_procPriority);
+ return ret;
+ }
+
+ return 0;
}
/* 80023428-800234BC 0094+00 s=0 e=1 z=0 None .text fpcPi_Handler__Fv */
@@ -135,11 +130,10 @@ s32 fpcPi_Handler() {
line_tag* pLineTag = &process->line_tag_;
if (fpcLyTg_Move(pLayerTag, i_procPriority->queue_info.layer_id, i_procPriority->queue_info.list_id,
- i_procPriority->queue_info.list_priority) == 1) {
+ i_procPriority->queue_info.list_priority) == 1)
+ {
fpcLnTg_Move(pLineTag, i_procPriority->current_info.list_id);
- i_procPriority->current_info.layer_id = i_procPriority->queue_info.layer_id;
- i_procPriority->current_info.list_id = i_procPriority->queue_info.list_id;
- i_procPriority->current_info.list_priority = i_procPriority->queue_info.list_priority;
+ i_procPriority->current_info = i_procPriority->queue_info;
} else {
return 0;
}
@@ -159,9 +153,8 @@ s32 fpcPi_Init(process_priority_class* i_procPriority, void* i_data, fpc_ProcID
i_procPriority->queue_info.list_id = i_listID;
i_procPriority->queue_info.list_priority = i_priority;
- i_procPriority->current_info.layer_id = i_procPriority->queue_info.layer_id;
- i_procPriority->current_info.list_id = i_procPriority->queue_info.list_id;
- i_procPriority->current_info.list_priority = i_procPriority->queue_info.list_priority;
+ i_procPriority->current_info = i_procPriority->queue_info;
+
cTg_Create(&i_procPriority->base, i_data);
fpcMtdTg_Init(&i_procPriority->method_tag, (process_method_tag_func)fpcPi_Delete, i_procPriority);
return 1;
diff --git a/src/f_pc/f_pc_profile.cpp b/src/f_pc/f_pc_profile.cpp
index fb3445b02e..33cc127328 100644
--- a/src/f_pc/f_pc_profile.cpp
+++ b/src/f_pc/f_pc_profile.cpp
@@ -10,5 +10,6 @@ process_profile_definition** g_fpcPf_ProfileList_p;
/* 80023564-80023578 0014+00 s=0 e=1 z=0 None .text fpcPf_Get__Fs */
process_profile_definition* fpcPf_Get(s16 i_profname) {
- return g_fpcPf_ProfileList_p[i_profname];
+ int index = i_profname;
+ return g_fpcPf_ProfileList_p[index];
}
diff --git a/src/f_pc/f_pc_searcher.cpp b/src/f_pc/f_pc_searcher.cpp
index 8f6331dba7..094dc6e187 100644
--- a/src/f_pc/f_pc_searcher.cpp
+++ b/src/f_pc/f_pc_searcher.cpp
@@ -7,8 +7,7 @@
/* 80023578-80023590 0018+00 s=0 e=3 z=77 None .text fpcSch_JudgeForPName__FPvPv */
void* fpcSch_JudgeForPName(void* i_proc, void* i_data) {
- s16 name = *(s16*)i_data;
- if (((base_process_class*)i_proc)->name == name)
+ if (((base_process_class*)i_proc)->name == *(s16*)i_data)
return i_proc;
return NULL;
@@ -16,8 +15,7 @@ void* fpcSch_JudgeForPName(void* i_proc, void* i_data) {
/* 80023590-800235A8 0018+00 s=0 e=44 z=270 None .text fpcSch_JudgeByID__FPvPv */
void* fpcSch_JudgeByID(void* i_proc, void* i_data) {
- fpc_ProcID process_id = *(fpc_ProcID*)i_data;
- if (((base_process_class*)i_proc)->id == process_id)
+ if (((base_process_class*)i_proc)->id == *(fpc_ProcID*)i_data)
return i_proc;
return NULL;
diff --git a/src/f_pc/f_pc_stdcreate_req.cpp b/src/f_pc/f_pc_stdcreate_req.cpp
index 5c985ace73..80191840e6 100644
--- a/src/f_pc/f_pc_stdcreate_req.cpp
+++ b/src/f_pc/f_pc_stdcreate_req.cpp
@@ -7,16 +7,21 @@
#include "f_pc/f_pc_load.h"
#include "f_pc/f_pc_node.h"
#include "f_pc/f_pc_manager.h"
+#include "f_pc/f_pc_debug_sv.h"
+#include <dolphin.h>
/* 80023B70-80023BC4 0054+00 s=1 e=0 z=5 None .text
* fpcSCtRq_phase_Load__FP29standard_create_request_class */
s32 fpcSCtRq_phase_Load(standard_create_request_class* i_request) {
- switch (fpcLd_Load(i_request->process_name)) {
+ int ret = fpcLd_Load(i_request->process_name);
+
+ switch (ret) {
case cPhs_INIT_e:
return cPhs_INIT_e;
case cPhs_COMPLEATE_e:
return cPhs_NEXT_e;
case cPhs_ERROR_e:
+ OS_REPORT("fpcSCtRq_phase_Load %d\n", i_request->process_name);
default:
return cPhs_ERROR_e;
}
@@ -28,7 +33,9 @@ s32 fpcSCtRq_phase_CreateProcess(standard_create_request_class* i_request) {
fpcLy_SetCurrentLayer(i_request->base.layer);
i_request->base.process =
fpcBs_Create(i_request->process_name, i_request->base.id, i_request->process_append);
+
if (i_request->base.process == NULL) {
+ OS_REPORT("fpcSCtRq_phase_CreateProcess %d\n", i_request->process_name);
fpcLd_Free(i_request->process_name);
return cPhs_ERROR_e;
} else {
@@ -41,7 +48,18 @@ s32 fpcSCtRq_phase_CreateProcess(standard_create_request_class* i_request) {
* fpcSCtRq_phase_SubCreateProcess__FP29standard_create_request_class */
s32 fpcSCtRq_phase_SubCreateProcess(standard_create_request_class* i_request) {
fpcLy_SetCurrentLayer(i_request->base.layer);
- return fpcBs_SubCreate(i_request->base.process);
+ int ret = fpcBs_SubCreate(i_request->base.process);
+
+#ifdef DEBUG
+ if (ret == 0 && i_request->unk_0x60-- <= 0) {
+ i_request->unk_0x60 = 0;
+ if (g_fpcDbSv_service[0] != NULL) {
+ g_fpcDbSv_service[0](i_request->base.process);
+ }
+ }
+#endif
+
+ return ret;
}
/* 80023C64-80023CBC 0058+00 s=1 e=0 z=14 None .text
@@ -59,13 +77,16 @@ s32 fpcSCtRq_phase_IsComplete(standard_create_request_class* i_request) {
/* 80023CBC-80023D0C 0050+00 s=1 e=0 z=5 None .text
* fpcSCtRq_phase_PostMethod__FP29standard_create_request_class */
s32 fpcSCtRq_phase_PostMethod(standard_create_request_class* i_request) {
- if (i_request->create_post_method != NULL &&
- i_request->create_post_method(i_request->base.process, i_request->unk_0x5C) == 0)
- {
- return cPhs_INIT_e;
- } else {
- return cPhs_NEXT_e;
+ stdCreateFunc create_func = i_request->create_post_method;
+
+ if (create_func != NULL) {
+ int ret = create_func(i_request->base.process, i_request->unk_0x5C);
+ if (ret == 0) {
+ return cPhs_INIT_e;
+ }
}
+
+ return cPhs_NEXT_e;
}
/* 80023D0C-80023D14 0008+00 s=1 e=0 z=0 None .text
@@ -138,5 +159,9 @@ fpc_ProcID fpcSCtRq_Request(layer_class* i_layer, s16 i_procName, stdCreateFunc
request->create_post_method = i_createFunc;
request->unk_0x5C = param_4;
request->process_append = i_append;
+#ifdef DEBUG
+ request->unk_0x60 = 60;
+#endif
+
return request->base.id;
}